// common.js: scripts common to all pages on the website

if (typeof(Patron) == "undefined") {
	Patron = {
		_adDefinitionArray: new Array(),

		// do an explicit init so that the tests can
		// zap everything and start over.
		init: function() {
			// config
			this.displayAds = true;
			this.inQA       = 'false' == 'true';

			// targting vars
			this.zone  = null; // MUST be set or ads won't work.
			this.ord   = this.generateOrd();
			this.ag    = "0";
			this.gnd   = "0";
            this.zip   = "";
            this.site  = "default";
			this.genre = null;
			this.tile  = 0;
			
			if( document.cookie != null && document.cookie.match(/v3ad=(\d+):(\d+):(\d+):(\d*)/) ) {
				this.displayAds = RegExp.$1 != '0';
				this.ag  = RegExp.$2;
				this.gnd = RegExp.$3;
                this.zip = RegExp.$4;
            }
	
			if( document.cookie != null && document.cookie.match(/v2pub=(\w+)/) ) {
				this.site = RegExp.$1;
			}
		},
	
		setZone: function(zone) {
			this.zone = zone;
		},
		
		setSite: function(site) {
			this.site = site;
		},

		setProfile: function(cookieValue) {
			var date = new Date();
			date.setTime(date.getTime()+(30*24*60*60*1000));	// 30 days
			var cookieStr = "v3ad=" + cookieValue + "; ";
			cookieStr += "expires=" + date.toGMTString() + "; ";
			cookieStr += "path=/; ";
			if (document.domain != null && document.domain.match(/pandora.com$/) ) {
				cookieStr += "domain=.pandora.com;";
			}
			document.cookie = cookieStr;

			// reset vars for future embeds
			var args = cookieValue.split(":");
			this.displayAds = String(args[0]) != '0';
			this.ag         = args[1];
			this.gnd        = args[2];
            this.zip        = args[3];
        },
		
		setQA: function(bool) {
			this.inQA = bool;
		},
		
		getDisplayAds: function() {
			return this.displayAds;
		},
		
		cacheGenre: function(genre) {
			this.genre = genre;
		},

		generateOrd: function() {
			return new Date().getTime() + "" + Math.floor(Math.random()*1000000);
		},
		
		generateEmbedUrl: function(path, options) {
			if (options == null)
				options = {};

			if (options.ord == null)
				options.ord = this.ord;

			if (options.genre != null) {
				// a new genre is specified.  We need to cache it.  (RADIO-4126)
				this.cacheGenre(options.genre);
			} else if (this.genre != null) {
				// see if we have a cached genre around
				options.genre = this.genre;
			}

			if (window.location.search != null && window.location.search.match(/patron=([^&]+)/)) {
				options.patron = RegExp.$1;
			}

			var pairs = [];
			for (var n in options) {
				pairs[pairs.length] = n + "=" + options[n];
			}
			
			return path + "?" + pairs.join('&');
		},

		insertIFrame: function(id, width, height, options, embedPrefix) {

			if (!this.displayAds)
				return;

			// if zone isn't set, it's an error.  The zone must be set.
			if (this.zone == null)
				return;
			
			document.write(this.generateIFrame(id, width, height, options, embedPrefix));
		},

		generateIFrame: function(id, width, height, options, embedPrefix) {
			if (!options)
				options = {};

			options.sz = width + "x" + height;
			if (options.tile == null)
				options.tile = ++this.tile;

			if (embedPrefix == null)
				embedPrefix = this.zone;

			var url = this.generateEmbedUrl("/include/" + embedPrefix + "AdEmbed.html", options);

			if (options.sz == "2000x8") {
				// not the real size...
				width = 728;
				height = 90;
			}

			if (options.sz == "2000x9" || options.sz == "2000x10") {
				// promotional gallery links - actual iframe dimensions
				width = 300;
			    height = 32;
			}

			// unique ids are necessary to prevent Safari caching bugs
			var unique = id + (new Date().getTime());
			var iframe = '<div id="' + id + '">'
			               + '<iframe id="' + unique +'" '
			               + 'src="' + url + '" '
			               + 'frameborder=0 marginheight=0 marginwidth=0 '
			               + 'scrolling="no" allowTransparency="true" '
			               + 'width="' + width + '" '
			               + 'height="' + height + '"></iframe></div>';

			this._adDefinitionArray.push(
			{
				unique: unique,
				options: options
			});

			return iframe;
		},

		// fetch and paint new ads for the backstage page
		refreshAds: function(){
			//regenerate the ord
			this.ord   = this.generateOrd();

			for (var i = 0; i < this._adDefinitionArray.length; i++){
				var adDefinition = this._adDefinitionArray[i];

				if (adDefinition.options == null){
					adDefinition.options = {};
				}

				// use the new ord
				adDefinition.options.ord = this.ord;

				var url = this.generateEmbedUrl("/include/" + this.zone + "AdEmbed.html", adDefinition.options);
				
				this.setIFrameURL(adDefinition.unique, url);
			}
		},

		setIFrameURL: function(iframeID, url){
			$("#" + iframeID).attr("src", url);
		},

		updateTargetingOptions: function(options) {
			if (!this.displayAds)
				return null;

			// if zone isn't set, it's an error.  The zone must be set.
			if (this.zone == null)
				return null;

			if (!options)
				options = {};

			options.ord   = this.ord;
			options.ag    = this.ag;
			options.gnd   = this.gnd;
            options.zip   = this.zip;

			return options;
		},

		// used for customization of stationa and advertiser pages
		insertScript: function(width, height, options) {
			options = this.updateTargetingOptions(options);
			if (options == null) return;

			options.sz = width + "x" + height;
			if (options.tile == null)
				options.tile = ++this.tile;
			
			if (options.ord == null)
				options.ord = this.ord;

			var url = this.generateDCUrl(options, "adj");

			document.write('<script src="' + url + '"><\/script>');
		},
		
		// Used for blog leaderboards.
		// Not capable of supporting expandables.
		insertDCFrame: function(id, width, height, options) {
			options = this.updateTargetingOptions(options);
			if (options == null) return;
			
			options.sz = width + "x" + height;
			if (options.tile == null)
				options.tile = ++this.tile;
			
			if (options.ord == null)
				options.ord = this.ord;

			var url = this.generateDCUrl(options, "adi");
			
			// need a unique ID on the IFrame for Safari
			var adId = "ad" + (new Date().getTime());
			html = '<iframe src="' + url + '" id="' + adId + '" ' +
				   'frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ' +
				   'topmargin="0" leftmargin="0" allowtransparency="true" width="' + width + '" ' +
				   'height="' + height + '"></iframe>';

			document.write('<div id="' + id + '">' + html + '</div>');
		},
		
		generateDCUrl: function(options, embedType) {

			// split things up to dete blockers
			var url = 'http://a'+'d.doublecl'+'ick.net/' + embedType + '/pand.';
		
			url += this.site;
			url += "/";
			url += this.inQA ? "test" : "prod";
			url += ".";
			url += this.zone;

			for (var n in options) {
				if (n != "sz" && n != "ord" && n != "tile" && options[n] != null && options[n] !== "") {
					url += ";" + n + "=" + options[n];
				}
			}

			// sz, tile, and ord need to be last on the URL according
			// Dart docs.  ord must be very last!  RADIO-4408
			url += ";sz=" + options.sz;
			if (options.tile != null)
				url += ";tile=" + options.tile;
			url += ";ord=" + options.ord;

			return url;
		},

		// for use within an embedded IFrame.  "private" -- do not call directly.
		insertAd: function(options) {
			options = this.updateTargetingOptions(options);
			if (options == null) return;

			// sz is determined from the URL
            if(window.location.search != null && window.location.search.length > 1) {
				var query = window.location.search.substr(1);
				var pairs = query.split("&");
				for (var i = 0; i < pairs.length; i++) {
					var tuple = pairs[i].split("=");
					
					// skip vars that begin with _ so you can optionally avoid
					// inclusion in the options hash.
					if (tuple[0].charAt(0) != '_') {
						options[tuple[0]] = tuple[1];
					}
				}
			}			

			var url = this.generateDCUrl(options, "adj");
			
			document.write('<script src="' + url + '"><\/script>');
		}
	};
	
	Patron.init();
}

// file: PandoraAPIv2.js

if (typeof(Pandora) == "undefined") {
	Pandora = {
		// --------------------------
		//        public API
		// --------------------------
		HOMEPAGE_WINDOW_TARGET: "PandoraTuner",
		BACKSTAGE_WINDOW_TARGET: "pandoraContent",
		PERFORM_HOMEPAGE_LAUNCH: true,
		
		setEventHandler: function(event, handler) {
			this.eventHandlers[event] = handler;
			this.registerForEventsIfNecessary();
		},
		
		launchStationFromId: function(/*string*/ id) {
			this.sendTunerCommand("ext_lsfi", id);
		},
		
		launchStationFromMusicId: function(/*string*/ musicId) {
			this.sendTunerCommand("ext_lsfmi", musicId);
		},
		
		launchStationFromSearchText: function(/*string*/ searchText) {
			this.sendTunerCommand("ext_lsfst", searchText);
		},

		launchQuickMixFromId: function(/*string*/ id) {
			this.sendTunerCommand("ext_lqmfi", id);
		},
		
		launchRegistration: function() {
			this.sendTunerCommand("ext_reg", "1");
		},

		launchExtra: function(id) {
			this.sendTunerCommand("ext_extra", id);
		},

		launchVideoAd: function(/* string */ key, /* string */ value) {
			this.sendTunerCommand("ext_vid", key + "=" + value);
		},

		launchShareCurrentStation: function() {
			this.sendTunerCommand("ext_lss", "");
		},
		
		getBaseUrl: function() {
			return 'http://www.pandora.com/';
		},
		
		// ---------------------------
		//   private utility methods
		// ---------------------------

		// the callback will be passed a boolean value indicating whether
		// or not the LocalConnection was successful.
		// This is used by custom radio ads.  Change those if you change this.
		verifyLocalConnection: function(/*string*/ callbackHandlerName) {
			this.sendTunerCommand("ext_ping", "", callbackHandlerName);
		},

		// NOTE: the Yahoo Messenger plugin references this API.  If you
		// change the name of this method, you'll need to update the
		// Yahoo plugin code too.
		// This fixes RADIO-2264.
		sidebarWindow: null,
		sidebarLaunchStation: function(/*string*/ type, /*string*/ id) {
			if (this.sidebarWindow && !this.sidebarWindow.closed) {
				// We've already opened a window, so use Messenger to communicate with it
				this.sendTunerCommand(type, id);
			} else {
				// Open a new window
				this.sidebarWindow = window.open(this.getBaseUrl() + '?' + type + '=' + escape(id), 'PandoraTuner');
			}
		},
		
		eventHandlers: {},
		registeredForEvents: false,
		
		registerForEventsIfNecessary: function() {
			if (this.registeredForEvents)
				return;
			
			var div = this.getDiv("tunerEventListenerDiv");
			if( div == null ) {
				div = document.createElement("DIV");
				div.id = "tunerEventListenerDiv";
				document.documentElement.appendChild(div);
			}
			this.embedFlash("PandoraEventsv2.swf", div);
			this.registeredForEvents = true;
		},
		
		fireEvent: function(eventName, /*Array*/ args) {
			if (this.eventHandlers[eventName] != null) {
				this.eventHandlers[eventName](args);
			}
		},
		
		sendTunerCommand: function(/*string*/ tunerVarName, /*string*/ param, /*string|null*/ callbackHandlerName) {
			var div = this.getDiv("tunerMessengerDiv");
			if( div == null ) {
				div = document.createElement("DIV");
				div.id = "tunerMessengerDiv";
				document.documentElement.appendChild(div);
			}
			this.setEventHandler("MessengerStatus", function(data) {
				Pandora.onTunerCommandAttempt(data.success, data.method, data.param);
			});
			this.embedFlash("Messenger.swf", 
							div, 
							{ 
								method: tunerVarName, 
								param: param, 
								callback: callbackHandlerName
							});
		},
		
		onTunerCommandAttempt: function(success, method, param) {
			if (!success && Pandora.PERFORM_HOMEPAGE_LAUNCH) {
				var args = {};
				args[method] = param;
				this.openHomepageWithArgs(args);
			}
		},
		
		// Yahoo plugin doesn't support POST, so the plugin will override
		// this value to be GET.
		homepageLaunchMethod: "POST",
		openHomepageWithArgs: function(args) {
			var form = document.createElement("FORM");
			form.style.display = "none";
			form.setAttribute("method", this.homepageLaunchMethod);
			form.setAttribute("action", this.getBaseUrl());
			form.setAttribute("target", this.HOMEPAGE_WINDOW_TARGET);
			for (var n in args) {
				var input = document.createElement("INPUT");
				input.setAttribute("type", "hidden");
				input.setAttribute("name", n);
				input.setAttribute("value", args[n]);
				form.appendChild(input);
			}
			document.body.appendChild(form);
			form.submit();
		},
	
		embedFlash: function(/*string*/ swf, /*dom element*/ elem, /*hash*/ params) {
			var flashVarsStr = "";
			if (params != null) {
				for (var n in params) {
					if (params[n] == null)
						continue;
					
					if (flashVarsStr != "") 
						flashVarsStr += "&";
						
					flashVarsStr += n + "=" + escape(params[n]);
				}
			}
			
			var swfUrl = this.getBaseUrl() + "radio/" + swf;
			elem.innerHTML = [
				'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"',
				'		codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"',
				'		WIDTH="0"', 
				'		HEIGHT="0"',
				'       id="Messenger">',
				'	<PARAM NAME=movie VALUE="' + swfUrl + '">',
				'	<PARAM NAME=quality VALUE=high>',
				'	<PARAM NAME=bgcolor VALUE=#FFFFFF>',
				'	<PARAM NAME=allowscriptaccess value=always>',
				'	<PARAM NAME=menu VALUE=false>',
				' <PARAM NAME="FlashVars" VALUE="' + flashVarsStr + '">',
				'<EMBED src="' + swfUrl + '"',
				'       quality=high',
				'       bgcolor=#FFFFFF',
				'       allowscriptaccess=always',
				'       WIDTH="0"',
				'       HEIGHT="0"',
				'       MENU="false"',
				'       NAME="Messenger" ALIGN="" TYPE="application/x-shockwave-flash"',
				'       PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"',
				'       FlashVars="' + flashVarsStr + '">',
				'</EMBED>',
				'</OBJECT>'
			].join("");
		},
			
		getDiv: function(divID) {
			if( document.getElementById ) {
				// standard (IE 5+)
				return document.getElementById(divID);
			} else {
				// IE 4
				return document.all[divID];
			}
		}
	};	
}

/*@cc_on@*/

/*@if (@_jscript_version >= 5.5) @*/
/* prevent execution of jQuery if included more than once */
if(typeof window.jQuery == "undefined") {
/*
 * jQuery 1.1.2 - New Wave Javascript
 *
 * Copyright (c) 2007 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2007-02-28 12:03:00 -0500 (Wed, 28 Feb 2007) $
 * $Rev: 1465 $
 */

// Global undefined variable
window.undefined = window.undefined;
var jQuery = function(a,c) {
	// If the context is global, return a new object
	if ( window == this )
		return new jQuery(a,c);

	// Make sure that a selection was provided
	a = a || document;
	
	// HANDLE: $(function)
	// Shortcut for document ready
	if ( jQuery.isFunction(a) )
		return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a );
	
	// Handle HTML strings
	if ( typeof a  == "string" ) {
		// HANDLE: $(html) -> $(array)
		var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);
		if ( m )
			a = jQuery.clean( [ m[1] ] );
		
		// HANDLE: $(expr)
		else
			return new jQuery( c ).find( a );
	}
	
	return this.setArray(
		// HANDLE: $(array)
		a.constructor == Array && a ||

		// HANDLE: $(arraylike)
		// Watch for when an array-like object is passed as the selector
		(a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||

		// HANDLE: $(*)
		[ a ] );
};

// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
	jQuery._$ = $;
	
// Map the jQuery namespace to the '$' one
var $ = jQuery;

jQuery.fn = jQuery.prototype = {
	jquery: "1.1.2",

	size: function() {
		return this.length;
	},
	
	length: 0,

	get: function( num ) {
		return num == undefined ?

			// Return a 'clean' array
			jQuery.makeArray( this ) :

			// Return just the object
			this[num];
	},
	pushStack: function( a ) {
		var ret = jQuery(a);
		ret.prevObject = this;
		return ret;
	},
	setArray: function( a ) {
		this.length = 0;
		[].push.apply( this, a );
		return this;
	},
	each: function( fn, args ) {
		return jQuery.each( this, fn, args );
	},
	index: function( obj ) {
		var pos = -1;
		this.each(function(i){
			if ( this == obj ) pos = i;
		});
		return pos;
	},

	attr: function( key, value, type ) {
		var obj = key;
		
		// Look for the case where we're accessing a style value
		if ( key.constructor == String )
			if ( value == undefined )
				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
			else {
				obj = {};
				obj[ key ] = value;
			}
		
		// Check to see if we're setting style values
		return this.each(function(index){
			// Set all the styles
			for ( var prop in obj )
				jQuery.attr(
					type ? this.style : this,
					prop, jQuery.prop(this, obj[prop], type, index, prop)
				);
		});
	},

	css: function( key, value ) {
		return this.attr( key, value, "curCSS" );
	},

	text: function(e) {
		if ( typeof e == "string" )
			return this.empty().append( document.createTextNode( e ) );

		var t = "";
		jQuery.each( e || this, function(){
			jQuery.each( this.childNodes, function(){
				if ( this.nodeType != 8 )
					t += this.nodeType != 1 ?
						this.nodeValue : jQuery.fn.text([ this ]);
			});
		});
		return t;
	},

	wrap: function() {
		// The elements to wrap the target around
		var a = jQuery.clean(arguments);

		// Wrap each of the matched elements individually
		return this.each(function(){
			// Clone the structure that we're using to wrap
			var b = a[0].cloneNode(true);

			// Insert it before the element to be wrapped
			this.parentNode.insertBefore( b, this );

			// Find the deepest point in the wrap structure
			while ( b.firstChild )
				b = b.firstChild;

			// Move the matched element to within the wrap structure
			b.appendChild( this );
		});
	},
	append: function() {
		return this.domManip(arguments, true, 1, function(a){
			this.appendChild( a );
		});
	},
	prepend: function() {
		return this.domManip(arguments, true, -1, function(a){
			this.insertBefore( a, this.firstChild );
		});
	},
	before: function() {
		return this.domManip(arguments, false, 1, function(a){
			this.parentNode.insertBefore( a, this );
		});
	},
	after: function() {
		return this.domManip(arguments, false, -1, function(a){
			this.parentNode.insertBefore( a, this.nextSibling );
		});
	},
	end: function() {
		return this.prevObject || jQuery([]);
	},
	find: function(t) {
		return this.pushStack( jQuery.map( this, function(a){
			return jQuery.find(t,a);
		}), t );
	},
	clone: function(deep) {
		return this.pushStack( jQuery.map( this, function(a){
			var a = a.cloneNode( deep != undefined ? deep : true );
			a.$events = null; // drop $events expando to avoid firing incorrect events
			return a;
		}) );
	},

	filter: function(t) {
		return this.pushStack(
			jQuery.isFunction( t ) &&
			jQuery.grep(this, function(el, index){
				return t.apply(el, [index])
			}) ||

			jQuery.multiFilter(t,this) );
	},

	not: function(t) {
		return this.pushStack(
			t.constructor == String &&
			jQuery.multiFilter(t, this, true) ||

			jQuery.grep(this, function(a) {
				return ( t.constructor == Array || t.jquery )
					? jQuery.inArray( a, t ) < 0
					: a != t;
			})
		);
	},

	add: function(t) {
		return this.pushStack( jQuery.merge(
			this.get(),
			t.constructor == String ?
				jQuery(t).get() :
				t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?
					t : [t] )
		);
	},
	is: function(expr) {
		return expr ? jQuery.filter(expr,this).r.length > 0 : false;
	},

	val: function( val ) {
		return val == undefined ?
			( this.length ? this[0].value : null ) :
			this.attr( "value", val );
	},

	html: function( val ) {
		return val == undefined ?
			( this.length ? this[0].innerHTML : null ) :
			this.empty().append( val );
	},
	domManip: function(args, table, dir, fn){
		var clone = this.length > 1; 
		var a = jQuery.clean(args);
		if ( dir < 0 )
			a.reverse();

		return this.each(function(){
			var obj = this;

			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));

			jQuery.each( a, function(){
				fn.apply( obj, [ clone ? this.cloneNode(true) : this ] );
			});

		});
	}
};

jQuery.extend = jQuery.fn.extend = function() {
	// copy reference to target object
	var target = arguments[0],
		a = 1;

	// extend jQuery itself if only one argument is passed
	if ( arguments.length == 1 ) {
		target = this;
		a = 0;
	}
	var prop;
	while (prop = arguments[a++])
		// Extend the base object
		for ( var i in prop ) target[i] = prop[i];

	// Return the modified object
	return target;
};

jQuery.extend({
	noConflict: function() {
		if ( jQuery._$ )
			$ = jQuery._$;
		return jQuery;
	},

	// This may seem like some crazy code, but trust me when I say that this
	// is the only cross-browser way to do this. --John
	isFunction: function( fn ) {
		return !!fn && typeof fn != "string" && !fn.nodeName && 
			typeof fn[0] == "undefined" && /function/i.test( fn + "" );
	},
	
	// check if an element is in a XML document
	isXMLDoc: function(elem) {
		return elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
	},

	nodeName: function( elem, name ) {
		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
	},
	// args is for internal usage only
	each: function( obj, fn, args ) {
		if ( obj.length == undefined )
			for ( var i in obj )
				fn.apply( obj[i], args || [i, obj[i]] );
		else
			for ( var i = 0, ol = obj.length; i < ol; i++ )
				if ( fn.apply( obj[i], args || [i, obj[i]] ) === false ) break;
		return obj;
	},
	
	prop: function(elem, value, type, index, prop){
			// Handle executable functions
			if ( jQuery.isFunction( value ) )
				value = value.call( elem, [index] );
				
			// exclude the following css properties to add px
			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;

			// Handle passing in a number to a CSS property
			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
				value + "px" :
				value;
	},

	className: {
		// internal only, use addClass("class")
		add: function( elem, c ){
			jQuery.each( c.split(/\s+/), function(i, cur){
				if ( !jQuery.className.has( elem.className, cur ) )
					elem.className += ( elem.className ? " " : "" ) + cur;
			});
		},

		// internal only, use removeClass("class")
		remove: function( elem, c ){
			elem.className = c ?
				jQuery.grep( elem.className.split(/\s+/), function(cur){
					return !jQuery.className.has( c, cur );	
				}).join(" ") : "";
		},

		// internal only, use is(".class")
		has: function( t, c ) {
			t = t.className || t;
			// escape regex characters
			c = c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
			return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
		}
	},
	swap: function(e,o,f) {
		for ( var i in o ) {
			e.style["old"+i] = e.style[i];
			e.style[i] = o[i];
		}
		f.apply( e, [] );
		for ( var i in o )
			e.style[i] = e.style["old"+i];
	},

	css: function(e,p) {
		if ( p == "height" || p == "width" ) {
			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];

			jQuery.each( d, function(){
				old["padding" + this] = 0;
				old["border" + this + "Width"] = 0;
			});

			jQuery.swap( e, old, function() {
				if (jQuery.css(e,"display") != "none") {
					oHeight = e.offsetHeight;
					oWidth = e.offsetWidth;
				} else {
					e = jQuery(e.cloneNode(true))
						.find(":radio").removeAttr("checked").end()
						.css({
							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
						}).appendTo(e.parentNode)[0];

					var parPos = jQuery.css(e.parentNode,"position");
					if ( parPos == "" || parPos == "static" )
						e.parentNode.style.position = "relative";

					oHeight = e.clientHeight;
					oWidth = e.clientWidth;

					if ( parPos == "" || parPos == "static" )
						e.parentNode.style.position = "static";

					e.parentNode.removeChild(e);
				}
			});

			return p == "height" ? oHeight : oWidth;
		}

		return jQuery.curCSS( e, p );
	},

	curCSS: function(elem, prop, force) {
		var ret;
		
		if (prop == "opacity" && jQuery.browser.msie)
			return jQuery.attr(elem.style, "opacity");
			
		if (prop == "float" || prop == "cssFloat")
		    prop = jQuery.browser.msie ? "styleFloat" : "cssFloat";

		if (!force && elem.style[prop])
			ret = elem.style[prop];

		else if (document.defaultView && document.defaultView.getComputedStyle) {

			if (prop == "cssFloat" || prop == "styleFloat")
				prop = "float";

			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
			var cur = document.defaultView.getComputedStyle(elem, null);

			if ( cur )
				ret = cur.getPropertyValue(prop);
			else if ( prop == "display" )
				ret = "none";
			else
				jQuery.swap(elem, { display: "block" }, function() {
				    var c = document.defaultView.getComputedStyle(this, "");
				    ret = c && c.getPropertyValue(prop) || "";
				});

		} else if (elem.currentStyle) {

			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
			
		}

		return ret;
	},
	
	clean: function(a) {
		var r = [];

		jQuery.each( a, function(i,arg){
			if ( !arg ) return;

			if ( arg.constructor == Number )
				arg = arg.toString();
			
			 // Convert html string into DOM nodes
			if ( typeof arg == "string" ) {
				// Trim whitespace, otherwise indexOf won't work as expected
				var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];

				var wrap =
					 // option or optgroup
					!s.indexOf("<opt") &&
					[1, "<select>", "</select>"] ||
					
					(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
					[1, "<table>", "</table>"] ||
					
					!s.indexOf("<tr") &&
					[2, "<table><tbody>", "</tbody></table>"] ||
					
				 	// <thead> matched above
					(!s.indexOf("<td") || !s.indexOf("<th")) &&
					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
					
					[0,"",""];

				// Go to html and back, then peel off extra wrappers
				div.innerHTML = wrap[1] + s + wrap[2];
				
				// Move to the right depth
				while ( wrap[0]-- )
					div = div.firstChild;
				
				// Remove IE's autoinserted <tbody> from table fragments
				if ( jQuery.browser.msie ) {
					
					// String was a <table>, *may* have spurious <tbody>
					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
						tb = div.firstChild && div.firstChild.childNodes;
						
					// String was a bare <thead> or <tfoot>
					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
						tb = div.childNodes;

					for ( var n = tb.length-1; n >= 0 ; --n )
						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
							tb[n].parentNode.removeChild(tb[n]);
					
				}
				
				arg = [];
				for (var i=0, l=div.childNodes.length; i<l; i++)
					arg.push(div.childNodes[i]);
			}

			if ( arg.length === 0 && !jQuery.nodeName(arg, "form") )
				return;
			
			if ( arg[0] == undefined || jQuery.nodeName(arg, "form") )
				r.push( arg );
			else
				r = jQuery.merge( r, arg );

		});

		return r;
	},
	
	attr: function(elem, name, value){
		var fix = jQuery.isXMLDoc(elem) ? {} : {
			"for": "htmlFor",
			"class": "className",
			"float": jQuery.browser.msie ? "styleFloat" : "cssFloat",
			cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
			innerHTML: "innerHTML",
			className: "className",
			value: "value",
			disabled: "disabled",
			checked: "checked",
			readonly: "readOnly",
			selected: "selected"
		};
		
		// IE actually uses filters for opacity ... elem is actually elem.style
		if ( name == "opacity" && jQuery.browser.msie && value != undefined ) {
			// IE has trouble with opacity if it does not have layout
			// Force it by setting the zoom level
			elem.zoom = 1; 

			// Set the alpha filter to set the opacity
			return elem.filter = elem.filter.replace(/alpha\([^\)]*\)/gi,"") +
				( value == 1 ? "" : "alpha(opacity=" + value * 100 + ")" );

		} else if ( name == "opacity" && jQuery.browser.msie )
			return elem.filter ? 
				parseFloat( elem.filter.match(/alpha\(opacity=(.*)\)/)[1] ) / 100 : 1;
		
		// Mozilla doesn't play well with opacity 1
		if ( name == "opacity" && jQuery.browser.mozilla && value == 1 )
			value = 0.9999;
			

		// Certain attributes only work when accessed via the old DOM 0 way
		if ( fix[name] ) {
			if ( value != undefined ) elem[fix[name]] = value;
			return elem[fix[name]];

		} else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
			return elem.getAttributeNode(name).nodeValue;

		// IE elem.getAttribute passes even for style
		else if ( elem.tagName ) {
			if ( value != undefined ) elem.setAttribute( name, value );
			if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 
				return elem.getAttribute( name, 2 );
			return elem.getAttribute( name );

		// elem is actually elem.style ... set the style
		} else {
			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
			if ( value != undefined ) elem[name] = value;
			return elem[name];
		}
	},
	trim: function(t){
		return t.replace(/^\s+|\s+$/g, "");
	},

	makeArray: function( a ) {
		var r = [];

		if ( a.constructor != Array )
			for ( var i = 0, al = a.length; i < al; i++ )
				r.push( a[i] );
		else
			r = a.slice( 0 );

		return r;
	},

	inArray: function( b, a ) {
		for ( var i = 0, al = a.length; i < al; i++ )
			if ( a[i] == b )
				return i;
		return -1;
	},
	merge: function(first, second) {
		var r = [].slice.call( first, 0 );

		// Now check for duplicates between the two arrays
		// and only add the unique items
		for ( var i = 0, sl = second.length; i < sl; i++ )
			// Check for duplicates
			if ( jQuery.inArray( second[i], r ) == -1 )
				// The item is unique, add it
				first.push( second[i] );

		return first;
	},
	grep: function(elems, fn, inv) {
		// If a string is passed in for the function, make a function
		// for it (a handy shortcut)
		if ( typeof fn == "string" )
			fn = new Function("a","i","return " + fn);

		var result = [];

		// Go through the array, only saving the items
		// that pass the validator function
		for ( var i = 0, el = elems.length; i < el; i++ )
			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
				result.push( elems[i] );

		return result;
	},
	map: function(elems, fn) {
		// If a string is passed in for the function, make a function
		// for it (a handy shortcut)
		if ( typeof fn == "string" )
			fn = new Function("a","return " + fn);

		var result = [], r = [];

		// Go through the array, translating each of the items to their
		// new value (or values).
		for ( var i = 0, el = elems.length; i < el; i++ ) {
			var val = fn(elems[i],i);

			if ( val !== null && val != undefined ) {
				if ( val.constructor != Array ) val = [val];
				result = result.concat( val );
			}
		}

		var r = result.length ? [ result[0] ] : [];

		check: for ( var i = 1, rl = result.length; i < rl; i++ ) {
			for ( var j = 0; j < i; j++ )
				if ( result[i] == r[j] )
					continue check;

			r.push( result[i] );
		}

		return r;
	}
});
 
/*
 * Whether the W3C compliant box model is being used.
 *
 * @property
 * @name $.boxModel
 * @type Boolean
 * @cat JavaScript
 */
new function() {
	var b = navigator.userAgent.toLowerCase();

	// Figure out what browser is being used
	jQuery.browser = {
		safari: /webkit/.test(b),
		opera: /opera/.test(b),
		msie: /msie/.test(b) && !/opera/.test(b),
		mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
	};

	// Check to see if the W3C box model is being used
	jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
};

jQuery.each({
	parent: "a.parentNode",
	parents: "jQuery.parents(a)",
	next: "jQuery.nth(a,2,'nextSibling')",
	prev: "jQuery.nth(a,2,'previousSibling')",
	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
	children: "jQuery.sibling(a.firstChild)"
}, function(i,n){
	jQuery.fn[ i ] = function(a) {
		var ret = jQuery.map(this,n);
		if ( a && typeof a == "string" )
			ret = jQuery.multiFilter(a,ret);
		return this.pushStack( ret );
	};
});

jQuery.each({
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after"
}, function(i,n){
	jQuery.fn[ i ] = function(){
		var a = arguments;
		return this.each(function(){
			for ( var j = 0, al = a.length; j < al; j++ )
				jQuery(a[j])[n]( this );
		});
	};
});

jQuery.each( {
	removeAttr: function( key ) {
		jQuery.attr( this, key, "" );
		this.removeAttribute( key );
	},
	addClass: function(c){
		jQuery.className.add(this,c);
	},
	removeClass: function(c){
		jQuery.className.remove(this,c);
	},
	toggleClass: function( c ){
		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
	},
	remove: function(a){
		if ( !a || jQuery.filter( a, [this] ).r.length )
			this.parentNode.removeChild( this );
	},
	empty: function() {
		while ( this.firstChild )
			this.removeChild( this.firstChild );
	}
}, function(i,n){
	jQuery.fn[ i ] = function() {
		return this.each( n, arguments );
	};
});

jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){
	jQuery.fn[ n ] = function(num,fn) {
		return this.filter( ":" + n + "(" + num + ")", fn );
	};
});

jQuery.each( [ "height", "width" ], function(i,n){
	jQuery.fn[ n ] = function(h) {
		return h == undefined ?
			( this.length ? jQuery.css( this[0], n ) : null ) :
			this.css( n, h.constructor == String ? h : h + "px" );
	};
});
jQuery.extend({
	expr: {
		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
		"#": "a.getAttribute('id')==m[2]",
		":": {
			// Position Checks
			lt: "i<m[3]-0",
			gt: "i>m[3]-0",
			nth: "m[3]-0==i",
			eq: "m[3]-0==i",
			first: "i==0",
			last: "i==r.length-1",
			even: "i%2==0",
			odd: "i%2",

			// Child Checks
			"nth-child": "jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a",
			"first-child": "jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a",
			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
			"only-child": "jQuery.sibling(a.parentNode.firstChild).length==1",

			// Parent Checks
			parent: "a.firstChild",
			empty: "!a.firstChild",

			// Text Check
			contains: "jQuery.fn.text.apply([a]).indexOf(m[3])>=0",

			// Visibility
			visible: 'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
			hidden: 'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',

			// Form attributes
			enabled: "!a.disabled",
			disabled: "a.disabled",
			checked: "a.checked",
			selected: "a.selected||jQuery.attr(a,'selected')",

			// Form elements
			text: "a.type=='text'",
			radio: "a.type=='radio'",
			checkbox: "a.type=='checkbox'",
			file: "a.type=='file'",
			password: "a.type=='password'",
			submit: "a.type=='submit'",
			image: "a.type=='image'",
			reset: "a.type=='reset'",
			button: 'a.type=="button"||jQuery.nodeName(a,"button")',
			input: "/input|select|textarea|button/i.test(a.nodeName)"
		},
		".": "jQuery.className.has(a,m[2])",
		"@": {
			"=": "z==m[4]",
			"!=": "z!=m[4]",
			"^=": "z&&!z.indexOf(m[4])",
			"$=": "z&&z.substr(z.length - m[4].length,m[4].length)==m[4]",
			"*=": "z&&z.indexOf(m[4])>=0",
			"": "z",
			_resort: function(m){
				return ["", m[1], m[3], m[2], m[5]];
			},
			_prefix: "z=a[m[3]];if(!z||/href|src/.test(m[3]))z=jQuery.attr(a,m[3]);"
		},
		"[": "jQuery.find(m[2],a).length"
	},
	
	// The regular expressions that power the parsing engine
	parse: [
		// Match: [@value='test'], [@foo]
		/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,

		// Match: [div], [div p]
		/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,

		// Match: :contains('foo')
		/^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,

		// Match: :even, :last-chlid
		/^([:.#]*)([a-z0-9_*-]*)/i
	],

	token: [
		/^(\/?\.\.)/, "a.parentNode",
		/^(>|\/)/, "jQuery.sibling(a.firstChild)",
		/^(\+)/, "jQuery.nth(a,2,'nextSibling')",
		/^(~)/, function(a){
			var s = jQuery.sibling(a.parentNode.firstChild);
			return s.slice(jQuery.inArray(a,s) + 1);
		}
	],

	multiFilter: function( expr, elems, not ) {
		var old, cur = [];

		while ( expr && expr != old ) {
			old = expr;
			var f = jQuery.filter( expr, elems, not );
			expr = f.t.replace(/^\s*,\s*/, "" );
			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
		}

		return cur;
	},
	find: function( t, context ) {
		// Quickly handle non-string expressions
		if ( typeof t != "string" )
			return [ t ];

		// Make sure that the context is a DOM Element
		if ( context && !context.nodeType )
			context = null;

		// Set the correct context (if none is provided)
		context = context || document;

		// Handle the common XPath // expression
		if ( !t.indexOf("//") ) {
			context = context.documentElement;
			t = t.substr(2,t.length);

		// And the / root expression
		} else if ( !t.indexOf("/") ) {
			context = context.documentElement;
			t = t.substr(1,t.length);
			if ( t.indexOf("/") >= 1 )
				t = t.substr(t.indexOf("/"),t.length);
		}

		// Initialize the search
		var ret = [context], done = [], last = null;

		// Continue while a selector expression exists, and while
		// we're no longer looping upon ourselves
		while ( t && last != t ) {
			var r = [];
			last = t;

			t = jQuery.trim(t).replace( /^\/\//i, "" );

			var foundToken = false;

			// An attempt at speeding up child selectors that
			// point to a specific element tag
			var re = /^[\/>]\s*([a-z0-9*-]+)/i;
			var m = re.exec(t);

			if ( m ) {
				// Perform our own iteration and filter
				jQuery.each( ret, function(){
					for ( var c = this.firstChild; c; c = c.nextSibling )
						if ( c.nodeType == 1 && ( jQuery.nodeName(c, m[1]) || m[1] == "*" ) )
							r.push( c );
				});

				ret = r;
				t = t.replace( re, "" );
				if ( t.indexOf(" ") == 0 ) continue;
				foundToken = true;
			} else {
				// Look for pre-defined expression tokens
				for ( var i = 0; i < jQuery.token.length; i += 2 ) {
					// Attempt to match each, individual, token in
					// the specified order
					var re = jQuery.token[i];
					var m = re.exec(t);

					// If the token match was found
					if ( m ) {
						// Map it against the token's handler
						r = ret = jQuery.map( ret, jQuery.isFunction( jQuery.token[i+1] ) ?
							jQuery.token[i+1] :
							function(a){ return eval(jQuery.token[i+1]); });

						// And remove the token
						t = jQuery.trim( t.replace( re, "" ) );
						foundToken = true;
						break;
					}
				}
			}

			// See if there's still an expression, and that we haven't already
			// matched a token
			if ( t && !foundToken ) {
				// Handle multiple expressions
				if ( !t.indexOf(",") ) {
					// Clean the result set
					if ( ret[0] == context ) ret.shift();

					// Merge the result sets
					jQuery.merge( done, ret );

					// Reset the context
					r = ret = [context];

					// Touch up the selector string
					t = " " + t.substr(1,t.length);

				} else {
					// Optomize for the case nodeName#idName
					var re2 = /^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;
					var m = re2.exec(t);
					
					// Re-organize the results, so that they're consistent
					if ( m ) {
					   m = [ 0, m[2], m[3], m[1] ];

					} else {
						// Otherwise, do a traditional filter check for
						// ID, class, and element selectors
						re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;
						m = re2.exec(t);
					}

					// Try to do a global search by ID, where we can
					if ( m[1] == "#" && ret[ret.length-1].getElementById ) {
						// Optimization for HTML document case
						var oid = ret[ret.length-1].getElementById(m[2]);
						
						// Do a quick check for the existence of the actual ID attribute
						// to avoid selecting by the name attribute in IE
						if ( jQuery.browser.msie && oid && oid.id != m[2] )
							oid = jQuery('[@id="'+m[2]+'"]', ret[ret.length-1])[0];

						// Do a quick check for node name (where applicable) so
						// that div#foo searches will be really fast
						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];

					} else {
						// Pre-compile a regular expression to handle class searches
						if ( m[1] == "." )
							var rec = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");

						// We need to find all descendant elements, it is more
						// efficient to use getAll() when we are already further down
						// the tree - we try to recognize that here
						jQuery.each( ret, function(){
							// Grab the tag name being searched for
							var tag = m[1] != "" || m[0] == "" ? "*" : m[2];

							// Handle IE7 being really dumb about <object>s
							if ( jQuery.nodeName(this, "object") && tag == "*" )
								tag = "param";

							jQuery.merge( r,
								m[1] != "" && ret.length != 1 ?
									jQuery.getAll( this, [], m[1], m[2], rec ) :
									this.getElementsByTagName( tag )
							);
						});

						// It's faster to filter by class and be done with it
						if ( m[1] == "." && ret.length == 1 )
							r = jQuery.grep( r, function(e) {
								//return rec.test(e.className);
								return null;
							});

						// Same with ID filtering
						if ( m[1] == "#" && ret.length == 1 ) {
							// Remember, then wipe out, the result set
							var tmp = r;
							r = [];

							// Then try to find the element with the ID
							jQuery.each( tmp, function(){
								if ( this.getAttribute("id") == m[2] ) {
									r = [ this ];
									return false;
								}
							});
						}

						ret = r;
					}

					t = t.replace( re2, "" );
				}

			}

			// If a selector string still exists
			if ( t ) {
				// Attempt to filter it
				var val = jQuery.filter(t,r);
				ret = r = val.r;
				t = jQuery.trim(val.t);
			}
		}

		// Remove the root context
		if ( ret && ret[0] == context ) ret.shift();

		// And combine the results
		jQuery.merge( done, ret );

		return done;
	},

	filter: function(t,r,not) {
		// Look for common filter expressions
		while ( t && /^[a-z[({<*:.#]/i.test(t) ) {

			var p = jQuery.parse, m;

			jQuery.each( p, function(i,re){
		
				// Look for, and replace, string-like sequences
				// and finally build a regexp out of it
				m = re.exec( t );

				if ( m ) {
					// Remove what we just matched
					t = t.substring( m[0].length );

					// Re-organize the first match
					if ( jQuery.expr[ m[1] ]._resort )
						m = jQuery.expr[ m[1] ]._resort( m );

					return false;
				}
			});

			// :not() is a special case that can be optimized by
			// keeping it out of the expression list
			if ( m[1] == ":" && m[2] == "not" )
				r = jQuery.filter(m[3], r, true).r;

			// Handle classes as a special case (this will help to
			// improve the speed, as the regexp will only be compiled once)
			else if ( m[1] == "." ) {

				var re = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");
				r = jQuery.grep( r, function(e){
					return re.test(e.className || "");
				}, not);

			// Otherwise, find the expression to execute
			} else {
				var f = jQuery.expr[m[1]];
				if ( typeof f != "string" )
					f = jQuery.expr[m[1]][m[2]];

				// Build a custom macro to enclose it
				eval("f = function(a,i){" +
					( jQuery.expr[ m[1] ]._prefix || "" ) +
					"return " + f + "}");

				// Execute it against the current filter
				r = jQuery.grep( r, f, not );
			}
		}

		// Return an array of filtered elements (r)
		// and the modified expression string (t)
		return { r: r, t: t };
	},
	
	getAll: function( o, r, token, name, re ) {
		for ( var s = o.firstChild; s; s = s.nextSibling )
			if ( s.nodeType == 1 ) {
				var add = true;

				if ( token == "." )
					add = s.className && re.test(s.className);
				else if ( token == "#" )
					add = s.getAttribute("id") == name;
	
				if ( add )
					r.push( s );

				if ( token == "#" && r.length ) break;

				if ( s.firstChild )
					jQuery.getAll( s, r, token, name, re );
			}

		return r;
	},
	parents: function( elem ){
		var matched = [];
		var cur = elem.parentNode;
		while ( cur && cur != document ) {
			matched.push( cur );
			cur = cur.parentNode;
		}
		return matched;
	},
	nth: function(cur,result,dir,elem){
		result = result || 1;
		var num = 0;
		for ( ; cur; cur = cur[dir] ) {
			if ( cur.nodeType == 1 ) num++;
			if ( num == result || result == "even" && num % 2 == 0 && num > 1 && cur == elem ||
				result == "odd" && num % 2 == 1 && cur == elem ) return cur;
		}
	},
	sibling: function( n, elem ) {
		var r = [];

		for ( ; n; n = n.nextSibling ) {
			if ( n.nodeType == 1 && (!elem || n != elem) )
				r.push( n );
		}

		return r;
	}
});
/*
 * A number of helper functions used for managing events.
 * Many of the ideas behind this code orignated from 
 * Dean Edwards' addEvent library.
 */
jQuery.event = {

	// Bind an event to an element
	// Original by Dean Edwards
	add: function(element, type, handler, data) {
		// For whatever reason, IE has trouble passing the window object
		// around, causing it to be cloned in the process
		if ( jQuery.browser.msie && element.setInterval != undefined )
			element = window;

		// if data is passed, bind to handler
		if( data ) 
			handler.data = data;

		// Make sure that the function being executed has a unique ID
		if ( !handler.guid )
			handler.guid = this.guid++;

		// Init the element's event structure
		if (!element.$events)
			element.$events = {};

		// Get the current list of functions bound to this event
		var handlers = element.$events[type];

		// If it hasn't been initialized yet
		if (!handlers) {
			// Init the event handler queue
			handlers = element.$events[type] = {};

			// Remember an existing handler, if it's already there
			if (element["on" + type])
				handlers[0] = element["on" + type];
		}

		// Add the function to the element's handler list
		handlers[handler.guid] = handler;

		// And bind the global event handler to the element
		element["on" + type] = this.handle;

		// Remember the function in a global list (for triggering)
		if (!this.global[type])
			this.global[type] = [];
		this.global[type].push( element );
	},

	guid: 1,
	global: {},

	// Detach an event or set of events from an element
	remove: function(element, type, handler) {
		if (element.$events) {
			var i,j,k;
			if ( type && type.type ) { // type is actually an event object here
				handler = type.handler;
				type    = type.type;
			}
			
			if (type && element.$events[type])
				// remove the given handler for the given type
				if ( handler )
					delete element.$events[type][handler.guid];
					
				// remove all handlers for the given type
				else
					for ( i in element.$events[type] )
						delete element.$events[type][i];
						
			// remove all handlers		
			else
				for ( j in element.$events )
					this.remove( element, j );
			
			// remove event handler if no more handlers exist
			for ( k in element.$events[type] )
				if (k) {
					k = true;
					break;
				}
			if (!k) element["on" + type] = null;
		}
	},

	trigger: function(type, data, element) {
		// Clone the incoming data, if any
		data = jQuery.makeArray(data || []);

		// Handle a global trigger
		if ( !element )
			jQuery.each( this.global[type] || [], function(){
				jQuery.event.trigger( type, data, this );
			});

		// Handle triggering a single element
		else {
			var handler = element["on" + type ], val,
				fn = jQuery.isFunction( element[ type ] );

			if ( handler ) {
				// Pass along a fake event
				data.unshift( this.fix({ type: type, target: element }) );
	
				// Trigger the event
				if ( (val = handler.apply( element, data )) !== false )
					this.triggered = true;
			}

			if ( fn && val !== false )
				element[ type ]();

			this.triggered = false;
		}
	},

	handle: function(event) {
		// Handle the second event of a trigger and when
		// an event is called after a page has unloaded
		if ( typeof jQuery == "undefined" || jQuery.event.triggered ) return;

		// Empty object is for triggered events with no data
		event = jQuery.event.fix( event || window.event || {} ); 

		// returned undefined or false
		var returnValue;

		var c = this.$events[event.type];

		var args = [].slice.call( arguments, 1 );
		args.unshift( event );

		for ( var j in c ) {
			// Pass in a reference to the handler function itself
			// So that we can later remove it
			args[0].handler = c[j];
			args[0].data = c[j].data;

			if ( c[j].apply( this, args ) === false ) {
				event.preventDefault();
				event.stopPropagation();
				returnValue = false;
			}
		}

		// Clean up added properties in IE to prevent memory leak
		if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;

		return returnValue;
	},

	fix: function(event) {
		// Fix target property, if necessary
		if ( !event.target && event.srcElement )
			event.target = event.srcElement;

		// Calculate pageX/Y if missing and clientX/Y available
		if ( event.pageX == undefined && event.clientX != undefined ) {
			var e = document.documentElement, b = document.body;
			event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
			event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
		}
				
		// check if target is a textnode (safari)
		if (jQuery.browser.safari && event.target.nodeType == 3) {
			// store a copy of the original event object 
			// and clone because target is read only
			var originalEvent = event;
			event = jQuery.extend({}, originalEvent);
			
			// get parentnode from textnode
			event.target = originalEvent.target.parentNode;
			
			// add preventDefault and stopPropagation since 
			// they will not work on the clone
			event.preventDefault = function() {
				return originalEvent.preventDefault();
			};
			event.stopPropagation = function() {
				return originalEvent.stopPropagation();
			};
		}
		
		// fix preventDefault and stopPropagation
		if (!event.preventDefault)
			event.preventDefault = function() {
				this.returnValue = false;
			};
			
		if (!event.stopPropagation)
			event.stopPropagation = function() {
				this.cancelBubble = true;
			};
			
		return event;
	}
};

jQuery.fn.extend({
	bind: function( type, data, fn ) {
		return this.each(function(){
			jQuery.event.add( this, type, fn || data, data );
		});
	},
	one: function( type, data, fn ) {
		return this.each(function(){
			jQuery.event.add( this, type, function(event) {
				jQuery(this).unbind(event);
				return (fn || data).apply( this, arguments);
			}, data);
		});
	},
	unbind: function( type, fn ) {
		return this.each(function(){
			jQuery.event.remove( this, type, fn );
		});
	},
	trigger: function( type, data ) {
		return this.each(function(){
			jQuery.event.trigger( type, data, this );
		});
	},
	toggle: function() {
		// Save reference to arguments for access in closure
		var a = arguments;

		return this.click(function(e) {
			// Figure out which function to execute
			this.lastToggle = this.lastToggle == 0 ? 1 : 0;
			
			// Make sure that clicks stop
			e.preventDefault();
			
			// and execute the function
			return a[this.lastToggle].apply( this, [e] ) || false;
		});
	},
	hover: function(f,g) {
		
		// A private function for handling mouse 'hovering'
		function handleHover(e) {
			// Check if mouse(over|out) are still within the same parent element
			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
	
			// Traverse up the tree
			while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; };
			
			// If we actually just moused on to a sub-element, ignore it
			if ( p == this ) return false;
			
			// Execute the right function
			return (e.type == "mouseover" ? f : g).apply(this, [e]);
		}
		
		// Bind the function to the two event listeners
		return this.mouseover(handleHover).mouseout(handleHover);
	},
	ready: function(f) {
		// If the DOM is already ready
		if ( jQuery.isReady )
			// Execute the function immediately
			f.apply( document, [jQuery] );
			
		// Otherwise, remember the function for later
		else {
			// Add the function to the wait list
			jQuery.readyList.push( function() { return f.apply(this, [jQuery]) } );
		}
	
		return this;
	}
});

jQuery.extend({
	/*
	 * All the code that makes DOM Ready work nicely.
	 */
	isReady: false,
	readyList: [],
	
	// Handle when the DOM is ready
	ready: function() {
		// Make sure that the DOM is not already loaded
		if ( !jQuery.isReady ) {
			// Remember that the DOM is ready
			jQuery.isReady = true;
			
			// If there are functions bound, to execute
			if ( jQuery.readyList ) {
				// Execute all of them
				jQuery.each( jQuery.readyList, function(){
					this.apply( document );
				});
				
				// Reset the list of functions
				jQuery.readyList = null;
			}
			// Remove event lisenter to avoid memory leak
			if ( jQuery.browser.mozilla || jQuery.browser.opera )
				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
		}
	}
});

new function(){

	jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
		"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
		"submit,keydown,keypress,keyup,error").split(","), function(i,o){
		
		// Handle event binding
		jQuery.fn[o] = function(f){
			return f ? this.bind(o, f) : this.trigger(o);
		};
			
	});
	
	// If Mozilla is used
	if ( jQuery.browser.mozilla || jQuery.browser.opera )
		// Use the handy event callback
		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
	
	// If IE is used, use the excellent hack by Matthias Miller
	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
	else if ( jQuery.browser.msie ) {
	
		// Only works if you document.write() it
		document.write("<scr" + "ipt id=__ie_init defer=true " + 
			"src=//:><\/script>");
	
		// Use the defer script hack
		var script = document.getElementById("__ie_init");
		
		// script does not exist if jQuery is loaded dynamically
		if ( script ) 
			script.onreadystatechange = function() {
				if ( this.readyState != "complete" ) return;
				this.parentNode.removeChild( this );
				jQuery.ready();
			};
	
		// Clear from memory
		script = null;
	
	// If Safari  is used
	} else if ( jQuery.browser.safari )
		// Continually check to see if the document.readyState is valid
		jQuery.safariTimer = setInterval(function(){
			// loaded and complete are both valid states
			if ( document.readyState == "loaded" || 
				document.readyState == "complete" ) {
	
				// If either one are found, remove the timer
				clearInterval( jQuery.safariTimer );
				jQuery.safariTimer = null;
	
				// and execute any waiting functions
				jQuery.ready();
			}
		}, 10); 

	// A fallback to window.onload, that will always work
	jQuery.event.add( window, "load", jQuery.ready );
	
};

// Clean up after IE to avoid memory leaks
if (jQuery.browser.msie)
	jQuery(window).one("unload", function() {
		var global = jQuery.event.global;
		for ( var type in global ) {
			var els = global[type], i = els.length;
			if ( i && type != 'unload' )
				do
					jQuery.event.remove(els[i-1], type);
				while (--i);
		}
	});
jQuery.fn.extend({
	loadIfModified: function( url, params, callback ) {
		this.load( url, params, callback, 1 );
	},
	load: function( url, params, callback, ifModified ) {
		if ( jQuery.isFunction( url ) )
			return this.bind("load", url);

		callback = callback || function(){};

		// Default to a GET request
		var type = "GET";

		// If the second parameter was provided
		if ( params )
			// If it's a function
			if ( jQuery.isFunction( params ) ) {
				// We assume that it's the callback
				callback = params;
				params = null;

			// Otherwise, build a param string
			} else {
				params = jQuery.param( params );
				type = "POST";
			}

		var self = this;

		// Request the remote document
		jQuery.ajax({
			url: url,
			type: type,
			data: params,
			ifModified: ifModified,
			complete: function(res, status){
				if ( status == "success" || !ifModified && status == "notmodified" )
					// Inject the HTML into all the matched elements
					self.attr("innerHTML", res.responseText)
					  // Execute all the scripts inside of the newly-injected HTML
					  .evalScripts()
					  // Execute callback
					  .each( callback, [res.responseText, status, res] );
				else
					callback.apply( self, [res.responseText, status, res] );
			}
		});
		return this;
	},
	serialize: function() {
		return jQuery.param( this );
	},
	evalScripts: function() {
		return this.find("script").each(function(){
			if ( this.src )
				jQuery.getScript( this.src );
			else
				jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" );
		}).end();
	}

});

// If IE is used, create a wrapper for the XMLHttpRequest object
if ( !window.XMLHttpRequest )
	XMLHttpRequest = function(){
		return new ActiveXObject("Microsoft.XMLHTTP");
	};

// Attach a bunch of functions for handling common AJAX events

jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
	jQuery.fn[o] = function(f){
		return this.bind(o, f);
	};
});

jQuery.extend({
	get: function( url, data, callback, type, ifModified ) {
		// shift arguments if data argument was ommited
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = null;
		}
		
		return jQuery.ajax({
			url: url,
			data: data,
			success: callback,
			dataType: type,
			ifModified: ifModified
		});
	},
	getIfModified: function( url, data, callback, type ) {
		return jQuery.get(url, data, callback, type, 1);
	},
	getScript: function( url, callback ) {
		return jQuery.get(url, null, callback, "script");
	},
	getJSON: function( url, data, callback ) {
		return jQuery.get(url, data, callback, "json");
	},
	post: function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = {};
		}

		return jQuery.ajax({
			type: "POST",
			url: url,
			data: data,
			success: callback,
			dataType: type
		});
	},

	// timeout (ms)
	//timeout: 0,
	ajaxTimeout: function( timeout ) {
		jQuery.ajaxSettings.timeout = timeout;
	},
	ajaxSetup: function( settings ) {
		jQuery.extend( jQuery.ajaxSettings, settings );
	},

	ajaxSettings: {
		global: true,
		type: "GET",
		timeout: 0,
		contentType: "application/x-www-form-urlencoded",
		processData: true,
		async: true,
		data: null
	},
	
	// Last-Modified header cache for next request
	lastModified: {},
	ajax: function( s ) {
		// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
		s = jQuery.extend({}, jQuery.ajaxSettings, s);

		// if data available
		if ( s.data ) {
			// convert data if not already a string
			if (s.processData && typeof s.data != "string")
    			s.data = jQuery.param(s.data);
			// append data to url for get requests
			if( s.type.toLowerCase() == "get" ) {
				// "?" + data or "&" + data (in case there are already params)
				s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data;
				// IE likes to send both get and post data, prevent this
				s.data = null;
			}
		}

		// Watch for a new set of requests
		if ( s.global && ! jQuery.active++ )
			jQuery.event.trigger( "ajaxStart" );

		var requestDone = false;

		// Create the request object
		var xml = new XMLHttpRequest();

		// Open the socket
		xml.open(s.type, s.url, s.async);

		// Set the correct header, if data is being sent
		if ( s.data )
			xml.setRequestHeader("Content-Type", s.contentType);

		// Set the If-Modified-Since header, if ifModified mode.
		if ( s.ifModified )
			xml.setRequestHeader("If-Modified-Since",
				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );

		// Set header so the called script knows that it's an XMLHttpRequest
		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");

		// Make sure the browser sends the right content length
		if ( xml.overrideMimeType )
			xml.setRequestHeader("Connection", "close");
			
		// Allow custom headers/mimetypes
		if( s.beforeSend )
			s.beforeSend(xml);
			
		if ( s.global )
		    jQuery.event.trigger("ajaxSend", [xml, s]);

		// Wait for a response to come back
		var onreadystatechange = function(isTimeout){
			// The transfer is complete and the data is available, or the request timed out
			if ( xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
				requestDone = true;
				
				// clear poll interval
				if (ival) {
					clearInterval(ival);
					ival = null;
				}
				
				var status;
				try {
					status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ?
						s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error";
					// Make sure that the request was successful or notmodified
					if ( status != "error" ) {
						// Cache Last-Modified header, if ifModified mode.
						var modRes;
						try {
							modRes = xml.getResponseHeader("Last-Modified");
						} catch(e) {} // swallow exception thrown by FF if header is not available
	
						if ( s.ifModified && modRes )
							jQuery.lastModified[s.url] = modRes;
	
						// process the data (runs the xml through httpData regardless of callback)
						var data = jQuery.httpData( xml, s.dataType );
	
						// If a local callback was specified, fire it and pass it the data
						if ( s.success )
							s.success( data, status );
	
						// Fire the global callback
						if( s.global )
							jQuery.event.trigger( "ajaxSuccess", [xml, s] );
					} else
						jQuery.handleError(s, xml, status);
				} catch(e) {
					status = "error";
					jQuery.handleError(s, xml, status, e);
				}

				// The request was completed
				if( s.global )
					jQuery.event.trigger( "ajaxComplete", [xml, s] );

				// Handle the global AJAX counter
				if ( s.global && ! --jQuery.active )
					jQuery.event.trigger( "ajaxStop" );

				// Process result
				if ( s.complete )
					s.complete(xml, status);

				// Stop memory leaks
				if(s.async)
					xml = null;
			}
		};
		
		// don't attach the handler to the request, just poll it instead
		var ival = setInterval(onreadystatechange, 13); 

		// Timeout checker
		if ( s.timeout > 0 )
			setTimeout(function(){
				// Check to see if the request is still happening
				if ( xml ) {
					// Cancel the request
					xml.abort();

					if( !requestDone )
						onreadystatechange( "timeout" );
				}
			}, s.timeout);
			
		// Send the data
		try {
			xml.send(s.data);
		} catch(e) {
			jQuery.handleError(s, xml, null, e);
		}
		
		// firefox 1.5 doesn't fire statechange for sync requests
		if ( !s.async )
			onreadystatechange();
		
		// return XMLHttpRequest to allow aborting the request etc.
		return xml;
	},

	handleError: function( s, xml, status, e ) {
		// If a local callback was specified, fire it
		if ( s.error ) s.error( xml, status, e );

		// Fire the global callback
		if ( s.global )
			jQuery.event.trigger( "ajaxError", [xml, s, e] );
	},

	// Counter for holding the number of active queries
	active: 0,

	// Determines if an XMLHttpRequest was successful or not
	httpSuccess: function( r ) {
		try {
			return !r.status && location.protocol == "file:" ||
				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
				jQuery.browser.safari && r.status == undefined;
		} catch(e){}
		return false;
	},

	// Determines if an XMLHttpRequest returns NotModified
	httpNotModified: function( xml, url ) {
		try {
			var xmlRes = xml.getResponseHeader("Last-Modified");

			// Firefox always returns 200. check Last-Modified date
			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
				jQuery.browser.safari && xml.status == undefined;
		} catch(e){}
		return false;
	},

	/* Get the data out of an XMLHttpRequest.
	 * Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
	 * otherwise return plain text.
	 * (String) data - The type of data that you're expecting back,
	 * (e.g. "xml", "html", "script")
	 */
	httpData: function( r, type ) {
		var ct = r.getResponseHeader("content-type");
		var data = !type && ct && ct.indexOf("xml") >= 0;
		data = type == "xml" || data ? r.responseXML : r.responseText;

		// If the type is "script", eval it in global context
		if ( type == "script" )
			jQuery.globalEval( data );

		// Get the JavaScript object, if JSON is used.
		if ( type == "json" )
			eval( "data = " + data );

		// evaluate scripts within html
		if ( type == "html" )
			jQuery("<div>").html(data).evalScripts();

		return data;
	},

	// Serialize an array of form elements or a set of
	// key/values into a query string
	param: function( a ) {
		var s = [];

		// If an array was passed in, assume that it is an array
		// of form elements
		if ( a.constructor == Array || a.jquery )
			// Serialize the form elements
			jQuery.each( a, function(){
				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
			});

		// Otherwise, assume that it's an object of key/value pairs
		else
			// Serialize the key/values
			for ( var j in a )
				// If the value is an array then the key names need to be repeated
				if ( a[j] && a[j].constructor == Array )
					jQuery.each( a[j], function(){
						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
					});
				else
					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );

		// Return the resulting serialization
		return s.join("&");
	},
	
	// evalulates a script in global context
	// not reliable for safari
	globalEval: function( data ) {
		if ( window.execScript )
			window.execScript( data );
		else if ( jQuery.browser.safari )
			// safari doesn't provide a synchronous global eval
			window.setTimeout( data, 0 );
		else
			eval.call( window, data );
	}

});
jQuery.fn.extend({

	show: function(speed,callback){
		var hidden = this.filter(":hidden");
		speed ?
			hidden.animate({
				height: "show", width: "show", opacity: "show"
			}, speed, callback) :
			
			hidden.each(function(){
				this.style.display = this.oldblock ? this.oldblock : "";
				if ( jQuery.css(this,"display") == "none" )
					this.style.display = "block";
			});
		return this;
	},

	hide: function(speed,callback){
		var visible = this.filter(":visible");
		speed ?
			visible.animate({
				height: "hide", width: "hide", opacity: "hide"
			}, speed, callback) :
			
			visible.each(function(){
				this.oldblock = this.oldblock || jQuery.css(this,"display");
				if ( this.oldblock == "none" )
					this.oldblock = "block";
				this.style.display = "none";
			});
		return this;
	},

	// Save the old toggle function
	_toggle: jQuery.fn.toggle,
	toggle: function( fn, fn2 ){
		var args = arguments;
		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
			this._toggle( fn, fn2 ) :
			this.each(function(){
				jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]
					.apply( jQuery(this), args );
			});
	},
	slideDown: function(speed,callback){
		return this.animate({height: "show"}, speed, callback);
	},
	slideUp: function(speed,callback){
		return this.animate({height: "hide"}, speed, callback);
	},
	slideToggle: function(speed, callback){
		return this.each(function(){
			var state = jQuery(this).is(":hidden") ? "show" : "hide";
			jQuery(this).animate({height: state}, speed, callback);
		});
	},
	fadeIn: function(speed, callback){
		return this.animate({opacity: "show"}, speed, callback);
	},
	fadeOut: function(speed, callback){
		return this.animate({opacity: "hide"}, speed, callback);
	},
	fadeTo: function(speed,to,callback){
		return this.animate({opacity: to}, speed, callback);
	},
	animate: function( prop, speed, easing, callback ) {
		return this.queue(function(){
		
			this.curAnim = jQuery.extend({}, prop);
			var opt = jQuery.speed(speed, easing, callback);
			
			for ( var p in prop ) {
				var e = new jQuery.fx( this, opt, p );
				if ( prop[p].constructor == Number )
					e.custom( e.cur(), prop[p] );
				else
					e[ prop[p] ]( prop );
			}
			
		});
	},
	queue: function(type,fn){
		if ( !fn ) {
			fn = type;
			type = "fx";
		}
	
		return this.each(function(){
			if ( !this.queue )
				this.queue = {};
	
			if ( !this.queue[type] )
				this.queue[type] = [];
	
			this.queue[type].push( fn );
		
			if ( this.queue[type].length == 1 )
				fn.apply(this);
		});
	}

});

jQuery.extend({
	
	speed: function(speed, easing, fn) {
		var opt = speed && speed.constructor == Object ? speed : {
			complete: fn || !fn && easing || 
				jQuery.isFunction( speed ) && speed,
			duration: speed,
			easing: fn && easing || easing && easing.constructor != Function && easing
		};

		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
			opt.duration : 
			{ slow: 600, fast: 200 }[opt.duration]) || 400;
	
		// Queueing
		opt.old = opt.complete;
		opt.complete = function(){
			jQuery.dequeue(this, "fx");
			if ( jQuery.isFunction( opt.old ) )
				opt.old.apply( this );
		};
	
		return opt;
	},
	
	easing: {},
	
	queue: {},
	
	dequeue: function(elem,type){
		type = type || "fx";
	
		if ( elem.queue && elem.queue[type] ) {
			// Remove self
			elem.queue[type].shift();
	
			// Get next function
			var f = elem.queue[type][0];
		
			if ( f ) f.apply( elem );
		}
	},

	/*
	 * I originally wrote fx() as a clone of moo.fx and in the process
	 * of making it small in size the code became illegible to sane
	 * people. You've been warned.
	 */
	
	fx: function( elem, options, prop ){

		var z = this;

		// The styles
		var y = elem.style;
		
		// Store display property
		var oldDisplay = jQuery.css(elem, "display");

		// Make sure that nothing sneaks out
		y.overflow = "hidden";

		// Simple function for setting a style value
		z.a = function(){
			if ( options.step )
				options.step.apply( elem, [ z.now ] );

			if ( prop == "opacity" )
				jQuery.attr(y, "opacity", z.now); // Let attr handle opacity
			else if ( parseInt(z.now) ) // My hate for IE will never die
				y[prop] = parseInt(z.now) + "px";
			
			y.display = "block"; // Set display property to block for animation
		};

		// Figure out the maximum number to run to
		z.max = function(){
			return parseFloat( jQuery.css(elem,prop) );
		};

		// Get the current size
		z.cur = function(){
			var r = parseFloat( jQuery.curCSS(elem, prop) );
			return r && r > -10000 ? r : z.max();
		};

		// Start an animation from one number to another
		z.custom = function(from,to){
			z.startTime = (new Date()).getTime();
			z.now = from;
			z.a();

			z.timer = setInterval(function(){
				z.step(from, to);
			}, 13);
		};

		// Simple 'show' function
		z.show = function(){
			if ( !elem.orig ) elem.orig = {};

			// Remember where we started, so that we can go back to it later
			elem.orig[prop] = this.cur();

			options.show = true;

			// Begin the animation
			z.custom(0, elem.orig[prop]);

			// Stupid IE, look what you made me do
			if ( prop != "opacity" )
				y[prop] = "1px";
		};

		// Simple 'hide' function
		z.hide = function(){
			if ( !elem.orig ) elem.orig = {};

			// Remember where we started, so that we can go back to it later
			elem.orig[prop] = this.cur();

			options.hide = true;

			// Begin the animation
			z.custom(elem.orig[prop], 0);
		};
		
		//Simple 'toggle' function
		z.toggle = function() {
			if ( !elem.orig ) elem.orig = {};

			// Remember where we started, so that we can go back to it later
			elem.orig[prop] = this.cur();

			if(oldDisplay == "none")  {
				options.show = true;
				
				// Stupid IE, look what you made me do
				if ( prop != "opacity" )
					y[prop] = "1px";

				// Begin the animation
				z.custom(0, elem.orig[prop]);	
			} else {
				options.hide = true;

				// Begin the animation
				z.custom(elem.orig[prop], 0);
			}		
		};

		// Each step of an animation
		z.step = function(firstNum, lastNum){
			var t = (new Date()).getTime();

			if (t > options.duration + z.startTime) {
				// Stop the timer
				clearInterval(z.timer);
				z.timer = null;

				z.now = lastNum;
				z.a();

				if (elem.curAnim) elem.curAnim[ prop ] = true;

				var done = true;
				for ( var i in elem.curAnim )
					if ( elem.curAnim[i] !== true )
						done = false;

				if ( done ) {
					// Reset the overflow
					y.overflow = "";
					
					// Reset the display
					y.display = oldDisplay;
					if (jQuery.css(elem, "display") == "none")
						y.display = "block";

					// Hide the element if the "hide" operation was done
					if ( options.hide ) 
						y.display = "none";

					// Reset the properties, if the item has been hidden or shown
					if ( options.hide || options.show )
						for ( var p in elem.curAnim )
							if (p == "opacity")
								jQuery.attr(y, p, elem.orig[p]);
							else
								y[p] = "";
				}

				// If a callback was provided, execute it
				if ( done && jQuery.isFunction( options.complete ) )
					// Execute the complete function
					options.complete.apply( elem );
			} else {
				var n = t - this.startTime;
				// Figure out where in the animation we are and set the number
				var p = n / options.duration;
				
				// If the easing function exists, then use it 
				z.now = options.easing && jQuery.easing[options.easing] ?
					jQuery.easing[options.easing](p, n,  firstNum, (lastNum-firstNum), options.duration) :
					// else use default linear easing
					((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;

				// Perform the next step of the animation
				z.a();
			}
		};
	
	}
});
}

/* 
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * $LastChangedDate$
 * $Rev$
 */

jQuery.fn._height = jQuery.fn.height;
jQuery.fn._width  = jQuery.fn.width;

/**
 * If used on document, returns the document's height (innerHeight)
 * If used on window, returns the viewport's (window) height
 * See core docs on height() to see what happens when used on an element.
 *
 * @example $("#testdiv").height()
 * @result 200
 *
 * @example $(document).height()
 * @result 800
 *
 * @example $(window).height()
 * @result 400
 * 
 * @name height
 * @type Object
 * @cat Plugins/Dimensions
 */
jQuery.fn.height = function() {
	if ( this.get(0) == window )
		return self.innerHeight ||
			jQuery.boxModel && document.documentElement.clientHeight ||
			document.body.clientHeight;
	
	if ( this.get(0) == document ) 
		return Math.max( document.body.scrollHeight, document.body.offsetHeight );
	
	return this._height(arguments[0]);
};

/**
 * If used on document, returns the document's width (innerWidth)
 * If used on window, returns the viewport's (window) width
 * See core docs on height() to see what happens when used on an element.
 *
 * @example $("#testdiv").width()
 * @result 200
 *
 * @example $(document).width()
 * @result 800
 *
 * @example $(window).width()
 * @result 400
 * 
 * @name width
 * @type Object
 * @cat Plugins/Dimensions
 */
jQuery.fn.width = function() {
	if ( this.get(0) == window )
		return self.innerWidth ||
			jQuery.boxModel && document.documentElement.clientWidth ||
			document.body.clientWidth;
	
	if ( this.get(0) == document )
		return Math.max( document.body.scrollWidth, document.body.offsetWidth );
	
	return this._width(arguments[0]);
};

/**
 * Returns the inner height value (without border) for the first matched element.
 * If used on document, returns the document's height (innerHeight)
 * If used on window, returns the viewport's (window) height
 *
 * @example $("#testdiv").innerHeight()
 * @result 800
 * 
 * @name innerHeight
 * @type Number
 * @cat Plugins/Dimensions
 */
jQuery.fn.innerHeight = function() {
	return this.get(0) == window || this.get(0) == document ?
		this.height() :
		this.get(0).offsetHeight - (parseInt(this.css("borderTopWidth")) || 0) - (parseInt(this.css("borderBottomWidth")) || 0);
};

/**
 * Returns the inner width value (without border) for the first matched element.
 * If used on document, returns the document's Width (innerWidth)
 * If used on window, returns the viewport's (window) width
 *
 * @example $("#testdiv").innerWidth()
 * @result 1000
 * 
 * @name innerWidth
 * @type Number
 * @cat Plugins/Dimensions
 */
jQuery.fn.innerWidth = function() {
	return this.get(0) == window || this.get(0) == document ?
		this.width() :
		this.get(0).offsetWidth - (parseInt(this.css("borderLeftWidth")) || 0) - (parseInt(this.css("borderRightWidth")) || 0);
};

/**
 * Returns the outer height value (including border) for the first matched element.
 * Cannot be used on document or window.
 *
 * @example $("#testdiv").outerHeight()
 * @result 1000
 * 
 * @name outerHeight
 * @type Number
 * @cat Plugins/Dimensions
 */
jQuery.fn.outerHeight = function() {
	return this.get(0) == window || this.get(0) == document ?
		this.height() :
		this.get(0).offsetHeight;	
};

/**
 * Returns the outer width value (including border) for the first matched element.
 * Cannot be used on document or window.
 *
 * @example $("#testdiv").outerWidth()
 * @result 1000
 * 
 * @name outerWidth
 * @type Number
 * @cat Plugins/Dimensions
 */
jQuery.fn.outerWidth = function() {
	return this.get(0) == window || this.get(0) == document ?
		this.width() :
		this.get(0).offsetWidth;
};

/**
 * Returns how many pixels the user has scrolled to the right (scrollLeft).
 * Works on containers with overflow: auto and window/document.
 *
 * @example $("#testdiv").scrollLeft()
 * @result 100
 * 
 * @name scrollLeft
 * @type Number
 * @cat Plugins/Dimensions
 */
jQuery.fn.scrollLeft = function() {
	if ( this.get(0) == window || this.get(0) == document )
		return self.pageXOffset ||
			jQuery.boxModel && document.documentElement.scrollLeft ||
			document.body.scrollLeft;
	
	return this.get(0).scrollLeft;
};

/**
 * Returns how many pixels the user has scrolled to the bottom (scrollTop).
 * Works on containers with overflow: auto and window/document.
 *
 * @example $("#testdiv").scrollTop()
 * @result 100
 * 
 * @name scrollTop
 * @type Number
 * @cat Plugins/Dimensions
 */
jQuery.fn.scrollTop = function() {
	if ( this.get(0) == window || this.get(0) == document )
		return self.pageYOffset ||
			jQuery.boxModel && document.documentElement.scrollTop ||
			document.body.scrollTop;

	return this.get(0).scrollTop;
};

/**
 * Returns the location of the element in pixels from the top left corner of the viewport.
 * 
 * For accurate readings make sure to use pixel values for margins, borders and padding.
 * 
 * @example $("#testdiv").offset()
 * @result { top: 100, left: 100, scrollTop: 10, scrollLeft: 10 }
 * 
 * @example $("#testdiv").offset({ scroll: false })
 * @result { top: 90, left: 90 }
 *
 * @example var offset = {}
 * $("#testdiv").offset({ scroll: false }, offset)
 * @result offset = { top: 90, left: 90 }
 *
 * @name offset	
 * @param Object options A hash of options describing what should be included in the final calculations of the offset.
 *                       The options include:
 *                           margin: Should the margin of the element be included in the calculations? True by default. 
 *                                   If set to false the margin of the element is subtracted from the total offset.
 *                           border: Should the border of the element be included in the calculations? True by default.
 *                                   If set to false the border of the element is subtracted from the total offset.
 *                           padding: Should the padding of the element be included in the calculations? False by default.
 *                                    If set to true the padding of the element is added to the total offset.
 *                           scroll: Should the scroll offsets of the parent elements be included in the calculations? 
 *                                   True by default. When true, it adds the total scroll offsets of all parents to the 
 *                                   total offset and also adds two properties to the returned object, scrollTop and 
 *                                   scrollLeft. If set to false the scroll offsets of parent elements are ignored. 
 *                                   If scroll offsets are not needed, set to false to get a performance boost.
 * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the 
 *                            chain will not be broken and the result will be assigned to this object.
 * @type Object
 * @cat Plugins/Dimensions
 * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 */
jQuery.fn.offset = function(options, returnObject) {
	var x = 0, y = 0, elem = this[0], parent = this[0], sl = 0, st = 0, options = jQuery.extend({ margin: true, border: true, padding: false, scroll: true }, options || {});
	do {
		x += parent.offsetLeft || 0;
		y += parent.offsetTop  || 0;

		// Mozilla and IE do not add the border
		if (jQuery.browser.mozilla || jQuery.browser.msie) {
			// get borders
			var bt = parseInt(jQuery.css(parent, 'borderTopWidth')) || 0;
			var bl = parseInt(jQuery.css(parent, 'borderLeftWidth')) || 0;
			
			// add borders to offset
			x += bl;
			y += bt;
			
			// Mozilla removes the border if the parent has overflow property other than visible
			if (jQuery.browser.mozilla && jQuery.css(parent, 'overflow') != 'visible' && parent != elem) {
				x += bl;
				y += bt;
			}
		}
		
		var op = parent.offsetParent;
		if (op && (op.tagName == 'BODY' || op.tagName == 'HTML')) {
			// Safari and IE don't add the body margin for elments positioned with static or relative
			if ((jQuery.browser.safari || jQuery.browser.msie) && jQuery.css(parent, 'position') != 'absolute') {
				x += parseInt(jQuery.css(op, 'marginLeft')) || 0;
				y += parseInt(jQuery.css(op, 'marginTop'))  || 0;
			}
			break;
		}

		if (options.scroll) {
			// Need to get scroll offsets in-between offsetParents
			var op = parent.offsetParent;
			do {
				sl += parent.scrollLeft || 0;
				st += parent.scrollTop  || 0;
				parent = parent.parentNode;
			} while (parent != op);
		} else {
			parent = parent.offsetParent;
		}
	} while (parent);
	
	if ( !options.margin) {
		x -= parseInt(jQuery.css(elem, 'marginLeft')) || 0;
		y -= parseInt(jQuery.css(elem, 'marginTop'))  || 0;
	}
	
	// Safari and Opera do not add the border for the element
	if ( options.border && (jQuery.browser.safari || jQuery.browser.opera) ) {
		x += parseInt(jQuery.css(elem, 'borderLeftWidth')) || 0;
		y += parseInt(jQuery.css(elem, 'borderTopWidth'))  || 0;
	} else if ( !options.border && !(jQuery.browser.safari || jQuery.browser.opera) ) {
		x -= parseInt(jQuery.css(elem, 'borderLeftWidth')) || 0;
		y -= parseInt(jQuery.css(elem, 'borderTopWidth'))  || 0;
	}
	
	if ( options.padding ) {
		x += parseInt(jQuery.css(elem, 'paddingLeft')) || 0;
		y += parseInt(jQuery.css(elem, 'paddingTop'))  || 0;
	}
	
	var returnValue = options.scroll ? { top: y - st, left: x - sl, scrollTop:  st, scrollLeft: sl }
									: { top: y, left: x };

	if (returnObject) { jQuery.extend(returnObject, returnValue); return this; }
	else              { return returnValue; }
};
/**
 *
 * The MenuManager class implements the browser based dropdown menus
 *
 * depends on /3rd-party/jquery/dimensions.js
 *
 **/
var MenuManager =
{
	menuHideTimeout: null,
	menuShowTimeout: null,

	WAIT_TIME_MENU_HIDE_AFTER_MOUSEOUT: 500,
	WAIT_TIME_MENU_SHOW_AFTER_BUTTON_MOUSEOVER: 250,
	
	FADE_TIME_MENU_SHOW: 350,
	FADE_TIME_MENU_HIDE: 100,

	onPageLoad: function() {
		$(".ul_menu_container").each(function() {
			var htmlDropDown = this;
			var jqDropDown = $(this);

			// Remove container from DOM and reinsert into BODY, so that CSS "top" and "left" will
			// always be relative to the BODY (which isn't always the case even with position:absolute)
			jqDropDown.prependTo(document.body);

			var dropdownID = jqDropDown.attr("ID");
			var buttonID = jqDropDown.attr("buttonID");

			var jqButton = $("#" + buttonID);

			jqButton.mouseover(function() {
				if (MenuManager.getCurrentButtonID() == this.id) {
					//if we're already showing the current menu, don't reshow it
					MenuManager.clearHideMenuTimeout();
				} else {
					//moused over a new or different button, hide the current menu and showh the new one
					MenuManager.hideMenu();

					//show the dropdown, but wait a tick
					MenuManager.menuShowTimeout = window.setTimeout(function() {
						MenuManager.menuShowTimeout = null;

						MenuManager.currentMenu = {button: $("#" + buttonID), dropdown: $("#" + dropdownID)};

						MenuManager.showMenu();
					}, MenuManager.WAIT_TIME_MENU_SHOW_AFTER_BUTTON_MOUSEOVER);
				}
			});

			jqButton.mouseout(function() {
				if (MenuManager.currentMenu == null) {
					//if the user mouses off a button before the menu is shown, don't show the menu
					window.clearTimeout(MenuManager.menuShowTimeout);
				}else{
					//if the dropdown is showing, set the hide timeout
					MenuManager.setHideMenuTimeout();
				}
			});

			jqDropDown.mouseover(MenuManager.clearHideMenuTimeout);

			jqDropDown.mouseout(MenuManager.setHideMenuTimeout);
		});

		$(".ul_menu_container").click(MenuManager.hideMenu);

		$(".ul_menu_item").mouseover(function() {
			$(this).css("background-color", "#ffcc80");
		});

		$(".ul_menu_item").mouseout(function() {
			$(this).css("background-color", "#ffffff");
		});
	},

	showMenu: function() {
		MenuManager.clearHideMenuTimeout();

		var jqButton = MenuManager.currentMenu.button;
		var jqDropDown = MenuManager.currentMenu.dropdown;

		var buttonHeight = $('img', jqButton).height();	// get image height if button is an image
		if (buttonHeight == null) {
			// Otherwise, get the height of the button's container
			buttonHeight = jqButton.outerHeight();
		}
		jqDropDown.css('top', (jqButton.offset().top + buttonHeight) + "px");
		jqDropDown.css('left', (jqButton.offset().left + jqButton.offset().scrollLeft) + "px");

		jqButton.css("background", "url(/images/nav_button_menu_hover.gif)");

		if ($.browser.safari) {
			//HACK!  fade doesn't work with safari.  simply show the menu.
			MenuManager.currentMenu.dropdown.show();
		} else {
			MenuManager.currentMenu.dropdown.fadeIn(MenuManager.FADE_TIME_MENU_SHOW);
		}
	},

	hideMenu: function() {
		if (MenuManager.currentMenu) {
			var jqButton = MenuManager.currentMenu.button;
			jqButton.css("background", "url(/images/nav_button_menu.gif)");

			if ($.browser.safari) {
				//HACK!  fade doesn't work with safari.  simply hide the menu.
				MenuManager.currentMenu.dropdown.hide();
			} else {
				MenuManager.currentMenu.dropdown.fadeOut(MenuManager.FADE_TIME_MENU_HIDE);
			}

			MenuManager.currentMenu = null;
		}
	},

	setHideMenuTimeout: function() {
		MenuManager.menuHideTimeout = window.setTimeout(MenuManager.hideMenu, MenuManager.WAIT_TIME_MENU_HIDE_AFTER_MOUSEOUT);
	},

	clearHideMenuTimeout: function() {
		if (MenuManager.menuHideTimeout != null) {
			window.clearTimeout(MenuManager.menuHideTimeout);
		}
	},

	getCurrentButtonID: function() {
		if (MenuManager.currentMenu != null) {
			return MenuManager.currentMenu.button.get(0).id;
		} else {
			return null;
		}
	}
}
$(document).ready(MenuManager.onPageLoad);

/*@end@*/


function showPopupMenu(strPopupContainerID)
{
	var jqBody = $(document.body);
	var jqPopupContainer = $('#' + strPopupContainerID);
	
	//would be nice if jquery had a 'isVisible' property...
	if (jqPopupContainer.css("display") != "block")
	{	//if the menu is not already visible, show it and listen for click events to hide it
		jqPopupContainer.show();
	
	       	var function_hideMenu;
	       	function_hideMenu = function() 
		{
			if (!jqPopupContainer.pastFirstHideCall)
			{	//ignore the first click event - it's just this same call
				//bubbled up.  A better way to do this would be to cancel 
				//bubble on the event.
				//TODO:  determine if all of our supported browsers support 'cancelBubble'
				jqPopupContainer.pastFirstHideCall = true;
			}
			else
			{
				jqPopupContainer.pastFirstHideCall = false;
				jqBody.unbind("click", function_hideMenu);
	
				jqPopupContainer.hide();
			}
		};
		
		jqBody.bind("click", function_hideMenu);
	}

	return jqPopupContainer;
}

function isEmpty(value) {
	return value == null || value == "" || value == "null";
}

function getDiv(divID) {
	if( document.getElementById ) {
		// standard (IE 5+)
		return document.getElementById(divID);
	} else {
		// IE 4
		return document.all[divID];
	}
}

// This script is required to properly display png transparency on IE 6 and 5.5
var bgsleight	= function() {
	function fnLoadPngs() {
		var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
		var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
		for (var i = document.all.length - 1, obj = null; (obj = document.all[i]); i--) {
			if (itsAllGood && obj.currentStyle.backgroundImage.match(/\.png/i) != null) {
				fnFixPng(obj);
				obj.attachEvent("onpropertychange", fnPropertyChanged);
			}
		}
	}

	function fnPropertyChanged() {
		if (window.event.propertyName == "style.backgroundImage") {
			var el = window.event.srcElement;
			if (!el.currentStyle.backgroundImage.match(/x\.gif/i)) {
				var bg	= el.currentStyle.backgroundImage;
				var src = bg.substring(5,bg.length-2);
				el.filters.item(0).src = src;
				el.style.backgroundImage = "url(/images/clearspacer.gif)";
			}
		}
	}

	function fnFixPng(obj) {
		var bg	= obj.currentStyle.backgroundImage;
		var src = bg.substring(5,bg.length-2);
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='crop')";
		obj.style.backgroundImage = "url(/images/clearspacer.gif)";
	}

	return {
		init: function() {
			if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
				window.attachEvent("onload", fnLoadPngs);
			}
		}
	}
}();
bgsleight.init();



OMNITURE_ODDS = 2 / 100;
gOmnitureEvents = "event1";

function getOmnitureID() {
	if (document.cookie.match(/omni=([^,;]+)/)) {
		return RegExp.$1;
	} else {
		return "";
	}
}

function selectForOmniture() {
	if (getOmnitureID() == "") {
		// should we sample this user?

		var value = "off";

		// reverse random() result to get around early Safari random seeding bug
		if (1 - Math.random() < OMNITURE_ODDS || location.search.indexOf("enableOmniture") >= 0) {
			// selected for sample, generate unique ID
			value = "t" + new Date().getTime() + "r" + Math.floor(Math.random() * 1000000);
		}

		var c = "omni=" + value + ";path=/;";
		if (document.domain != null && document.domain.match(/pandora.com$/) ) {
			c += "domain=.pandora.com;";
		}
		document.cookie = c;
	}
}

function hasOmnitureID() {
	var id = getOmnitureID();
	return id != "" && id != "off";
}

function addOmnitureEvent(e) {
	gOmnitureEvents += "," + e;
}

function getOmnitureAccount() {
	if (document.domain.indexOf("pandora.com") >= 0) {
		return "pandoracom";
	} else {
		return "pandoradev";
	}
}

function embedOmniture() {	
	if (!hasOmnitureID()) {
		// cookies are disabled or not selected
		return;
	}
	
	// embed the code
		
	/* SiteCatalyst code version: H.12.
	Copyright 1997-2007 Omniture, Inc. More info available at
	http://www.omniture.com */
	/* Specify the Report Suite ID(s) to track here */
	var s_account=getOmnitureAccount();
	var s=s_gi(s_account)
	/************************** CONFIG SECTION **************************/
	/* You may add or alter any code config here. */
	s.charSet="ISO-8859-1"
	/* Conversion Config */
	s.currencyCode="USD"
	/* Link Tracking Config */
	s.trackDownloadLinks=true
	s.trackExternalLinks=true
	s.trackInlineStats=true
	s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls"
	s.linkInternalFilters="javascript:," + location.hostname;
	s.linkLeaveQueryString=false
	s.linkTrackVars="None"
	s.linkTrackEvents="None"
	
	/* WARNING: Changing any of the below variables will cause drastic
	changes to how your visitor data is collected.  Changes should only be
	made when instructed to do so by your account manager.*/
	s.visitorNamespace="pandoramedia"
	s.dc=112
	
	/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
	var s_code='',s_objectID;function s_gi(un,pg,ss){var d="function s_dr"
	+"(x,o,n){var i=x.indexOf(o);if(i>=0&&x.split)x=(x.split(o)).join(n);"
	+"else while(i>=0){x=x.substring(0,i)+n+x.substring(i+o.length);i=x.i"
	+"ndexOf(o)}return x}function s_d(x) {var t='`^@$#',l='0123456789ABCD"
	+"EFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',d,n=0,b,k,w,i=x.l"
	+"astIndexOf('~~');if(i>0){d=x.substring(0,i);x=x.substring(i+2);whil"
	+"e(d){w=d;i=d.indexOf('~');if(i>0){w=d.substring(0,i);d=d.substring("
	+"i+1)}else d='';b=parseInt(n/62);k=n-b*62;k=t.substring(b,b+1)+l.sub"
	+"string(k,k+1);x=s_dr(x,k,w);n++}for(i=0;i<5;i++){w=t.substring(i,i+"
	+"1);x=s_dr(x,w+' ',w)}}return x}",c=".substring(~.indexOf(~return ~="
	+"f`K(~){`Ls=^u~';`At`g~;$1~.toLowerCase()~`YF`K('e`z`Ls=s_c_il['+@f+"
	+"']~};s.~`r $1~.length~`YObject~.toUpperCase~s.wd~.location~')q='~s."
	+"apv~s.`v~$d$T~unction~var ~s.pt(~ookieDomainPeriods~,`z,'~while(~.p"
	+"rotocol~){$1~);s.~:'')~;@E^Us[k],255)}~=''~javaEnabled~connection^E"
	+"~=new ~.lastIndexOf('~tm.get~@5\"$Ns.b.addBehavior('# default# ~onc"
	+"lick~ternalFilters~entElement~Name~=='~javascriptVersion~=parseFloa"
	+"t(~=s.dynamicAccount~s_c_il['+@f+'].mrq(\"'+un+'\")'~visitor~cookie"
	+"~parseInt(~s.^I~o@6oid~browser~else~referrer~colorDepth~String~link"
	+"~.host~s.rep(~}catch(e){~','~r=s.m(f)?s[f](~}$1~s.un~s.eo~s.sq~t=s."
	+"ot(o)~track~j='1.~)?'Y':'N'~$XURL~@6c_i~s.ismac~lugins~;for(~Type~s"
	+".rc[un]~s.b.addEventListener~Download~tfs~resolution~.get@H()~s.eh~"
	+"s.isie~s.vl_l~s.vl_t~Height~t,h){t=t?t~isopera~escape(~screen.~s.fl"
	+"(~harCode~&&(~variableProvider~s.gg('objectID')~&&s.~:'';h=h?h~e&&l"
	+"$cSESSION'~');~f',~Date~name~home$X~s_c2~s.c_r(~s.rl[u~o.href~Lifet"
	+"ime~Width~sEnabled~'){q='~transactionID~b.attachEvent~&&l$cNONE'){~"
	+"ExternalLinks~_'+~this~charSet~onerror~currencyCode~s=s_gi(~e$PElem"
	+"ent~;s.gl(s.vl_g~.parent~Array~lnk~Opera~eval(~.s_~Math.~s.fsg~s.ns"
	+"6~docum~s.oun~InlineStats~'0123456789~s[k]=~window~onload~Time~s.ep"
	+"a(~s.c_w(~(s.ssl~n=s.oid(o)~LeaveQuery~')>=~&&t~'=')~){n=~+1))~' '+"
	+"~s.t()}~\",''),~=s.oh(o);~+(y<1900?~ingServer~true~sess~campaign~li"
	+"f~s_gs(~,100)~s.co(~s._in~x in ~='s_~ffset~s.c_d~'&pe~s.gv(~s.qav~s"
	+".pl~=(apn~Sampling~sqs',q);~Year(~=s.n.app~(''+~)+'/~',s~'||t~s()+'"
	+":'+~a):f(~){v=s.n.~channel~if(~un)~.target~o.value~\".tl(\")~etscap"
	+"e~(ns?ns:~s_')t=t~omePage~++}~&&!~')<~){x~1);~e))~'+n~height~events"
	+"~trk~random~code~un,~try{~'MSIE ~.src~floor(~s.pg~s.num(~s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g^Iet@v.g^Ioe,'g^Ifb')}`2`o`9"
	+"mrq`3u`4,l=^j],n,r;^j]=0`6l)for(n=0;n<l`B;n$ar$ls.mr(0,0,r.t,r.u,r."
	+"r)}`9mr`3@Z,q,ta,u,rs`4,dc=$V,t1=s.^6@X,t2=s.^6@XSecure,ns=s.`l`fsp"
	+"ace,un=u?u:$7s.f$2,unc=`x$M'_`z-'),r`C,l,imn@hi^t($2,im,b,e`6!rs){r"
	+"s='http'+@K?'s'`T+'://'+(t1?@K@O2?t2:t1):($7@K?'102':unc))+'.'+($V?"
	+"$V:112)+'.2o7.net')@ub/ss/'+^2+'/1/H.12-pdv-2/'+@Z+'?[AQB]&ndh=1'+("
	+"q?q`T+'&[AQE]'`6^M$B^B`R`H>5.5)rs=^Urs,4095);`r rs=^Urs,2047)}^1s.d"
	+".images&&`H>=3^W!s.^R||`H>=7)^W@9<0||`H>=6.1)`R!s.rc)s.rc`C`6!^F){^"
	+"F=1`6!s.rl)s.rl`C;^jn]`Y@2;set@Hout('`k,750)}`r{l=^jn]`6l){r.t=ta;r"
	+".u=un;r.r=rs;l[l`B]=r;`2''}imn+='^t^F;^F$Aim=`E[imn]`6!im)im=`E[imn"
	+"]`YImage;im@6l=0;im.@G`YF`K('e`z^u@6l=1;`k);im$P=rs`6rs`1@k=@N0^W!t"
	+"a||ta`g_self@wa`g_top'||(`E.^f@Oa==`E.^f))){b=e`Y^e;`P!im@6l&&e^K-b"
	+"^K<500)e`Y^e}`2''}`2'<im'+'g sr'+'c=\"'+rs+'\" width=1 $H=1 border="
	+"0 alt=\"\">'`9gg`3v`4;`2`E['s^tv]`9glf`3t,a`Rt`00,2)`g$8`02);`Ls=^u"
	+",v=s.gg(t)`6v)s[t]=v`9gl`3v`4`6$R)`Mv`Ogl^d0)`9gv`3v`4;`2s['vpm^tv]"
	+"?s['vpv^tv]:(s[v]?s[v]`T`9havf`3t,a`4,b=t`00,4),x=t`04),n=`nx),k='g"
	+"^tt,m='vpm^tt,q=t,v=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^4q)$1x&&^4q[x]^Wx==q||c<2)){v+=(v$e'`T+^4q[x]+'`"
	+"Jx);c$A`2@Jk,v,0)`9wdl`8,r=@Y,b=^L(`E,\"@G\"),i,o,oc`6b)r=^u$ke)^Di"
	+"=0;i<s.d.`vs`B;i$ao=s.d.`vs[i];oc=o.`c?\"\"+o.`c:\"\"`6(oc`1\"@c\")"
	+"<0||oc`1\"@6oc(\")>=0)&&oc`1$5<0)^L(o,\"`c\",0,s.lc);}`2r^c`Es`3`4`"
	+"6`H>3^W!^M||!^B||`H$i`Rs.b^Z^q)s.^q('`c@v.bc);`As.b&&^G)^G('click@v"
	+".bc,false);`r ^L(`E,'@G',0,`El)}`9vs`3x`4,v=s.`l@p,g=s.`l@pGroup,k@"
	+"hvsn^t^2+(g?'^tg`T,n=^ik),e`Y^e,y=e.get@r);e$Y@ry+10@W1900:0))`6v){"
	+"v*=100`6!n`R!@Jk,x,$F`20;n=x^1n%10000>v)`20}`21`9dyasmf`3t,m`Rt&&m&"
	+"&m`1t)>=0)`21;`20`9dyasf`3t,m`4,i=t?t`1@P:-1,n,x`6i>=0&&m){`Ln=t`00"
	+",i),x=t`0i+1)`6`Mx`Odyasm^dm))`2n}`20`9uns`3`4,x`jSelection,l`jList"
	+",m`jMatch,n,i;^2=^2`7`6x&&l`R!m)m=`E`F`w`6!m.toLowerCase)m`V+m;l=l`"
	+"7;m=m`7;n=`Ml,';`zdyas^dm)`6n)^2=n}i=^2`1`z`Sfun=i<0?^2:^2`00,i)`9s"
	+"a`3un`4;^2=un`6!@B)@B=un;`A(`z+@B+`z)`1$2<0)@B+=`z+un;^2s()`9t`3`4,"
	+"$J=1,tm`Y^e,sed=Math&&@7$K?@7$Q@7$K()*10000000000000):`a@H(),@Z='s'"
	+"+@7$Q`a@H()/10800000)%10+sed,y=`a@r),vt=`a^e(@u'+`aMonth(@u'@Wy+190"
	+"0:y)+@S`aHour@x`aMinute@x`aSeconds()+@S`aDay()+@S`a@HzoneO@i(),^I=s"
	+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`f?`I`f:s.ln(h);t=`I^E?`I^E`"
	+"7:s.lt(h)`6t^Wh||l))q+=@k=@3^t(t`gd@w`ge'?$Tt):'o')+(h?@kv1`Jh)`T+("
	+"l?@kv2`Jl)`T;`r $J=0`6s.^6@C`R!p$h@l'^9^cw=0}^5;i=o.sourceIndex`6^Y"
	+"@Q^Y;x=1;i=1^1p&&n@O)qs='&pid`J^Up,255))+(w$epidt$dw`T+'&oid`J^Un@d"
	+")+(x$eoidt$dx`T+'&ot`Jt)+(i$eoi$di`T}^1!$J$Bqs)`2''`6s.p_r)s.p_r();"
	+"`L$L`V`6$J^Zvs(sed))$L=s.mr(@Z,(vt$et`Jvt)`T+s.hav()+q+(qs?qs:s.rq("
	+"^2)),ta`Ssq($J$bqs`S@3=^3=`I`f=`I^E=`E@6objectID=s.ppu`V`6$R)`E@6@3"
	+"=`E@6eo=`E@6`v`f=`E@6`v^E`V;`2$L`9tl`3o,t,n`4;s.@3=@eo);`I^E=t;`I`f"
	+"=n;s.t()`9ssl=(`E`F`Q`7`1'https@N0`Sd=@Aent;s.b=s.d.body;s.n=naviga"
	+"tor;s.u=s.n.userAgent;@9=s.u`1'N$66/^c`Lapn@s`f,v@sVersion,ie=v`1$O"
	+"'),o=s.u`1'@4 '),i`6v`1'@4@N0||o>0)apn='@4';^M@o`gMicrosoft Interne"
	+"t Explorer'`Sisns@o`gN$6'`S^R@o`g@4'`Sismac=(s.u`1'Mac@N0)`6o>0)`H`"
	+"is.u`0o+6));`Aie>0){`H=`ni=v`0ie+5))`6`H>3)`H`ii)}`A@9>0)`H`is.u`0@"
	+"9+10));`r `H`iv`Sem=0`6`u$Z^V){i=^S`u$Z^V(256))`D(`Sem=(i`g%C4%80'?"
	+"2:(i`g%U0100'?1:0))}s.sa(un`Svl_l='`lID,vmk,ppu,^v,`l`fspace,c`N,`m"
	+"^l,$X`f,^9,`s,^x,purchaseID';^O=^N+',^X,$0,server,$X^E,^p,@a,state,"
	+"zip,$I,products,`v`f,`v^E'^D`Ln=1;n<51;n++)^O+=',prop$G+',eVar$G+',"
	+"hier$G;^N2='^J,`t,`h,`W,`m^n,`q^m,`q^P,`X,^g,p^C';^O+=`z+^N2;s.vl_g"
	+"=^O+',^6^HLinks,^6^s,^6@C,`v@M`u,`v^HFile^Es,`vEx`d,`vIn`d,`v`fs,@3"
	+"';$R=pg@0)`6!ss)`Es()}",
	w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=
	v.indexOf('MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(un){un=
	un.toLowerCase();if(l)for(i=0;i<l.length;i++){s=l[i];if(s._c=='s_c'){
	if(s.oun==un)return s;else if(s.fs(s.oun,un)){s.sa(un);return s}}}}
	w.eval(d);c=s_d(c);i=c.indexOf("function s_c(");w.eval(c.substring(0,i
	));if(!un)return 0;c=c.substring(i);if(e>0){a=parseInt(i=v.substring(e
	+5));if(a>3)a=parseFloat(i)}else if(m>0)a=parseFloat(u.substring(m+10)
	);else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf(
	'Opera')<0){eval(c);return new s_c(un,pg,ss)}else s=s_c2f(c);return s(
	un,pg,ss)}s_gi()

	/* You may give each page an identifying name, server, and channel on
	the next lines. */
	
	// If you update these, be sure to update the corresponding entries
	// in the tuner
	s.visitorID=getOmnitureID()
	s.pageName=location.pathname
	s.server=""
	s.channel=Patron.site
	s.pageType=""
	s.eVar1=s.prop1=Patron.displayAds ? "1" : "0";
	s.eVar2=s.prop2=Patron.ag
	s.eVar3=s.prop3=Patron.gnd
	s.eVar4=s.prop4=Patron.zip
	s.eVar5=s.prop5=Patron.genre
	//eVar6/prop6 reserved for Flash version
	
	/* Conversion Variables */
	s.campaign=""
	s.state=""
	s.zip=""
	s.events=gOmnitureEvents;
	s.products=""
	s.purchaseID=""

	/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
	var s_code=s.t();if(s_code)document.write(s_code);
	
}
